It looks like an error with the variable 'forza', although maybe there's more code above this that we can't see. But as this code stands, it looks as though it will toggle the variable every frame. One frame does -forza, then the next frame it does -forza again so it'd keep toggling?
The way I'd do it, I'd move the object towards/away from the magnet, just using the angle between the two, and just set up a seperate line of code for each situation. So....
Animation Frame = 0
Move Object at angle(x,y,x,y) + distance
Animation Frame =1
Move object at angle(x,y,x,y) - distance
That might be a bit too simple for your needs though, it looks like you're trying to do it a bit more precisely.