Thought I'd post this here as it might help somebody else who doesn't understand why magnets don't work when created at runtime. Just wasted an hour trying to figure this out when it's a bug.
I've added a bug report. Seems the same applies to physics fans when created at runtime, they don't work either.
physics magnet not working.mfa
physics magnet working.mfa