Moving Objects by Applying Force

Moving Objects by Applying Force

Jun 14 2019, 4:47 PM PST

You want to move a part in a certain direction with a certain force.

Use the BodyThrust object controlled with the force property.

local b = Instance.new('BodyThrust')
b.force = Vector3.new(0, 5000, 5000)
b.location = Vector3.new(0, 100, 100)
b.Parent = Workspace.Part

The BodyThrust object uses its force property to control the force on each respective axis. Then it uses its location property to determine the direction in which is going to apply the force.

The BodyForce object is older and is ultimately intended to be replaced by VectorForce. We recommend you use VectorForce instead.
  • physics
  • bodyforce
  • movement
  • coding