How does walkToPosition work?

I’m trying to make a simple script of a character that could walk to a position but it doesn’t work in any way i try to use it, any help?

Use this:

Character.Humanoid:MoveTo(Target.Position)

Character is the NPC you want to move and target is the part you want the character to move to.

1 Like

Also Humanoid:MoveTo() has a time out of 8 seconds which means you have to call it multiple times or the character will just stop moving.

When I Run the game, The Character wont move.
What is causing it?

Make sure every part of the character is unanchored.

1 Like

local Character = script.Parent

Character.Humanoid:MoveTo(workspace.GoHere.Position)

(and every part is unanchored)
and character is already in workspace

Is the character spawned in through another script or is it already in the workspace?

1 Like

That’s strange I’m not sure why it’s not working. All I can say is make sure every single thing on the character is unanchored and check for any errors.

1 Like

Make sure to use a ServerScript and not a LocalScript

1 Like

FIXED! HumanoidRootPart was anchored.

1 Like