Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make sure a part stays in place and moves with BodyForce?

Does anyone know how to make sure an object stays on the same Vector3 coordinates and not fall to the ground when unanchored and using a BodyForce?

If I cant then does anyone know another BodyMover that can do the same effect im trying to do with moving a part in a certain direction?

Example of what I have currently: https://gyazo.com/a0acb6cf3d0e9cb8cd69dd08a4da3644

1 answer

✓ Accepted answer

To simulate anti-gravity on a BasePart (so that it will not move without a force other than gravity), parent a BodyForce to it with a BodyForce.Force property of Vector3.new(0, workspace.Gravity * part:GetMass(), 0), assuming part references the BasePart.

This works because W = m * g, so we're effectively applying a force equivalent to the weight of the part against its natural force of weight, resulting in a balanced force.

You can then apply any other required forces on top of this.

1 comment

1

Wow, thank you so much!

This discussion is preserved as it was. New answers, comments, and votes are closed.