How can I use vector force to propel the player towards their mouse?

I know somewhat how to use vector force, or some other body mover, but I can’t figure out how to make the player move towards the mouse position. All of the other posts are outdated and because they use the legacy body movers, so does anyone know? Thanks

1 Like

Set your vector force to ApplyAtCenterOfMass and Relative to World, it will now act like a body mover. The normalized difference in vectors provides a direction pointing to the mouse. You may want to remove the Y component of this vector

local force = 200
local difference = body.Position - mouse.Hit.Position
local direction = Vector3.new(difference.X, 0, difference.Z)--remove Y value
VectorForce.Force = direction.Unit * force
3 Likes

It somewhat works, but it doesn’t go towards the part, it just goes a random direction

Edit: I turned the force into a negative and for some reason it worked.

1 Like