Im trying to get my Npc to move from part to part but all he does is stand there?
print("Doge Moveing") -- Just to see if the script is running Part = game.Workspace.G.Position Part2 = game.Workspace.G1.Position Part3 = game.Workspace.G2.Position while true do game.Workspace.Doge.Humaniod:MoveTo(Part) wait(15) game.Workspace.Doge.Humaniod:MoveTo(Part2) wait(15) game.Workspace.Doge.Humaniod:MoveTo(Part3) wait(15) end
Ok, first of all, the first answer is incorrect. Yes, you did misspell Humanoid. And based on your question, you want the character to walk to the location, right?
The fixes:
print("Doge Moving") -- Just to see if the script is running Part = game.Workspace.G.Position Part2 = game.Workspace.G1.Position Part3 = game.Workspace.G2.Position while true do game.Workspace.Doge.Humanoid:MoveTo(Part) wait(15) game.Workspace.Doge.Humanoid:MoveTo(Part2) wait(15) game.Workspace.Doge.Humanoid:MoveTo(Part3) wait(15) end
A Humanoid's MoveTo method takes one argument and one optional argument (Vector3 location, Instance part = nil). The MoveTo method in Humanoids make the humanoid WALK to the location given.
I looked in the wiki. NOWHERE did I see that Parts have a :MoveTo method. This is why the others are wrong.
First off, there are a few things wrong with your script. 1. You spelled "Humanoid" wrong. 2. You don't use MoveTo() on a humanoid.
Fixes: You need to call MoveTo() on the torso, because humanoid doesn't use MoveTo() Removed humanoid because you don't use humanoid with MoveTo()
print("Doge Moving") --Fixed speling mistakes part = game.Workspace.G.Position part2 = game.Workspace.G1.Position part3 = game.Workspace.G2.Position while true do game.Workspace.Doge.Torso:MoveTo(part) --Fixed MoveTo() on lines 6, 8, and 10. (Don't forget to use torso, not humanoid!) wait(15) game.Workspace.Doge.Torso:MoveTo(part2) wait(15) game.Workspace.Doge.Torso:MoveTo(part3) wait(15) --Don't forget to always end a while true do loop with a wait. end