Humanoid:MoveTo() Either moves to random location or doesn't move at all

Tried moving an NPC from a local script using Humanoid.MoveTo(desired position) but the NPC either doesn’t move at all or moves into a random direction. I’ve run into the same issue a few years ago and couldn’t find a solution. I only noticed this strange behavior with r15 characters. r6 works fine.

NPC.Humanoid:MoveTo(waypoints.Folder.Waypoint_1.Position)
wait(1.5) --enough time to finish the walk (blud doesn't even attempt to walk)
NPC.Humanoid:MoveTo(waypoints.Folder.Waypoint_2.Position) --neither...
		
NPC.Humanoid.MoveToFinished:Wait()
NPC.Humanoid:MoveTo(waypoints.Folder.Waypoint_3.Position)
--tries to move to waypoint3 from the start position (blocked cuz the npc refused to do the first two walks).
wait(4)
		

Now in this example, the Humanoid doesn’t move “randomly” as said in the title. But I’ve had situations where that is the case.
No errors, variables are correctly assigned.

1 Like

I’d advise that you use PathfindingService - create.roblox.com, also wait is deprecated and has been replaced by task.wait.

Use the Part parameter of MoveTo.