How do i do MoveTo() walk straight?

Here’s a bug that happens when i use lookvector

The code line of code:

script.Parent.Humanoid:MoveTo(script.Parent.HumanoidRootPart.CFrame.LookVector +,0,10))
1 Like

Doing +,0,10) to a lookvector is just adding 10 world units on the Z axis to the look direction of the player. You’d want to multiply lookVector by how many studs you want to move.

script.Parent.Humanoid:MoveTo(script.Parent.HumanoidRootPart.CFrame.LookVector * 10)

still the same problem :confused:

LookVector is always relative to its orientation. You can multiply it by 10 instead of adding it or depending on your goal, add a Vector3 to the second parameter of to make it “face” that direction.

I just read that you used MoveTo, mb. What you should do instead of MoveTo is use Move. Using MoveTo is a position value, if you want to make them move forward with MoveTo, you have to take

script.Parent.HumanoidRootPart.CFrame.LookVector * 10

Which is a velocity, and add it to the characters torso/rootpart position.

Move is like MoveTo but based on velocity, not a world position.

is there any way of “breaking” the Move()?


Set it to a velocity of 0,0,0.

alright thank you, you helped me a lot!

Np, best of luck on your project my friend.