i was watching a tutorial and i tried the script and it didnt work
and yes, i did double check to make sure that i was following the tutorial right
local PathfindingService = game:GetService("PathfindingService") local human = script.Parent:WaitForChild("Humanoid") local torso = script.Parent:WaitForChild("Torso") local path = PathfindingService:CreatePath() path:ComputeAsync(torso.Position, game.Workspace.endingPart.Position) local waypoints = path:GetWaypoints() for i, waypoint in pairs(waypoints) do human:MoveTo(waypoint.Position) human.MoveToFinished:Wait(2) end human:MoveTo(workspace.endingPart.Position)
Adding a number as argument for a :Wait()
function does nothing at all, as it doesn't take any arguments.
Nonetheless, my best guesses here would be that either the NPC is anchored, the script is a local script, or script.Parent
isn't the NPC.