I'm making a randomly walking person that walks between a set of nodes I made but for some reason he just teleports to each node??
Heres my script :
while wait() do local points = game.Workspace.Nodes:GetChildren() local randomPoint = points[math.random(1,#points)] local Minion = game.Workspace.NPC local Table = {} Minion:MoveTo(randomPoint) repeat wait() until (Minion.Torso.Position - randomPoint.Position).magnitude <= 2 end
while wait() do local points = game.Workspace.Nodes:GetChildren() local randomPoint = points[math.random(1,#points)] local Minion = game.Workspace.NPC local Table = {} Minion.Humanoid:MoveTo(randomPoint) -- Use it on Humanoid (if it has humanoid) repeat wait() until (Minion.Torso.Position - randomPoint.Position).magnitude <= 2 end
MoveTo() used on a model will make the model teleport to that position, but using MoveTo() on a Humanoid will make it walk.