How to move the character to the left with a BodyVelocity?

I’m attempting to move the player’s character to the left relative to the direction the player is facing. So, no matter which way the player is facing, the code will always move them to the left of the direction they are facing. However, I’m struggling to move the character in relation to the direction the character is facing.

Here’s my code:

			local Vel = Instance.new("BodyVelocity")
			Vel.Parent = HumanoidRootPart
			Vel.Velocity = Vector3.new(0, 0, 0)
			Vel.MaxForce = Vector3.new(1, 1, 1) * 5000
			Vel.Velocity = HumanoidRootPart.CFrame.LookVector * 1 + Vector3.new(0, 60, 90)

Your help is appreciated!! :slight_smile:

1 Like
Vel.Velocity = -HumanoidRootPart.CFrame.RightVector * 100

Thank you for the response! I just tested this and it still doesnt move the player based on the direction the player is facing. Attached is a video of it.
robloxapp-20230703-1554307.wmv (1.7 MB)

1 Like

Figured it out! Thanks for contributing to helping me figure this out!

local Vel = Instance.new("BodyVelocity")
Vel.Parent = HumanoidRootPart
Vel.MaxForce = Vector3.one * 5000
Vel.Velocity = HumanoidRootPart.CFrame.RightVector * -200

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.