Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I make a Part fly in the same direction that the HumanoidRootPart is facing? (forwards)

Asked by 6 years ago

I'm confused how I would make a Part fly (using BodyVelocity) in the same direction that the HumanoidRootPart (of the LocalPlayer) is facing. Please help.

1 answer

Log in to vote
0
Answered by 6 years ago

To do this you will the the LookVector of a HumanoidRootPart. Whats a "LookVector" you ask. Its the direction the part is facing. Now we need to get the HumanoidRootPart's LookVector And set its BodyVelocity to that. It will look something like this.

--Guessing your bodyVelocity Instance name is bv
bv.Velocity = game.Players.LocalPlayer.Character.HumanoidRootPart.LookVector * 50
--This basically gets the HumanoidRootParts LookVector Or where its looking at and the 50 sets --the Speed of how fast the part will be moving

Hope I helped :)

Ad

Answer this question