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

How do I make a player move in the direction they are facing?

Asked by 2 years ago

I am trying to make something where when the player clicks a key they go forward in the direction they are facing very fast but for some reason it doesn't go in the correct direction most of the time and the speed varies on how u rotate, here is my script :

local BodyVelocity = Instance.new("BodyVelocity") BodyVelocity.Parent = Character.HumanoidRootPart BodyVelocity.Velocity = Character.HumanoidRootPart.CFrame.LookVector * 50 Debris:AddItem(BodyVelocity, 2.09)

Any help would be greatly appreciated.

0
Okay I figured out what I did wrong, so turns out im just stupid and I didn't set the Maxforce to math.huge. louisvanleuven 0 — 2y

Answer this question