I am making a dash system where you dash forward, backward, left or right, depending on if you’re pressing w, a, s, or d. Forward and backward dashing work, but I can’t figure out how to get the player to go side to side. I am using body velocity.
local HumanoidRootPart = Character.HumanoidRootPart
local BodyVelocity = Instance.new("BodyVelocity")
BodyVelocity.MaxForce = Vector3.new(math.huge, 0, math.huge)
BodyVelocity.Velocity = HumanoidRootPart.CFrame.LookVector * 100
BodyVelocity.Parent = HumanoidRootPart
task.wait(.3)
BodyVelocity:Destroy()
if anyone knows how to do this I would appreciate it.