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

How Would I Make A BodyForce Move A Brick a Particular Direction?

Simply put, I am trying to use a BodyForce to move an unanchored brick in the direction a player is facing at a particular time. Is there a way to know the BodyForce that corresponds to this direction?

1 answer

✓ Accepted answer

Just use a body velocity and change the part rotation to the rotation of the player (so it goes to the front of the player) after that just edit the velocity however you wish, it should look something like this:

local char = game.Players.LocalPlayer.Character

part.Cframe = char.UpperTorso.CFrame * CFrame.new(0,0,-5)

local force = Instance.new("BodyVelocity")
force.Parent = --The Part you want
force.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
force.Velocity = char.UpperTorso.Cframe.lookVector * 100

1 comment

0

Thank you!

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