How to script where your character moves

Hello, Hope your having a good day I’m writing this to ask how to Move your character like so your player you can script it to walk to a certain location Please help me I’m lost

1 Like

You can use Humanoid:MoveTo() to force a player to walk to a certain location.

2 Likes

Assuming you just want a way to force-move the player to a point, you can use the MoveTo method on the player’s Humanoid for that, like so:

local character = game.Players.LocalPlayer.Character
local location = Vector3.new(0, 0, 0) --//Coordinates to a point in the game world

character.Humanoid:MoveTo(location)
3 Likes

You might also need some kind of check in case the player overrides the movement by pressing arrow keys, etc.

1 Like

That’s true. I believe there’s a way to disable the player controls from the controls module, although I forget the exact syntax to do that, like the method name and such.

1 Like

Yeah in properties of StarterPlayer