I don't need a whole script I just the the gist of it. I am learning scripting and I know the basics, and some advanced scripting.
Get the npc's humanoid then do Humanoid:MoveTo(Vector3.new(X,Y,Z))
Example:
1 | npc.Humanoid:MoveTo(Vector 3. new( 43 , 0 , 2 )) |
or if you wanna move the npc to a specific part you can do Humanoid:MoveTo(workspace.Part.Position)
Example:
1 | npc.Humanoid:MoveTo(workspace.Part.Position) |
But if there is a wall in the npc's path he just gonna keep walking into it because this method doesn't use pathfinding that you can read about more here wiki.roblox.com/index.php?title=Pathfinding
1 | humanoid = game.Workspace.NPC.Humanoid |
2 | while true do |
3 | humanoid:MoveTo(Vector 3. new( 0 , 0 , 0 ), game.Workspace.Baseplate) |
4 | wait( 3 ) |
5 | humanoid:MoveTo(Vector 3. new(Put position here), game.Workspace.Baseplate) |
6 | wait( 3 ) |