local PFS = game:GetService("PathfindingService") local hum = script.Parent:WaitForChild("Humanoid") local torso = script.Parent:WaitForChild("Torso") local path = PFS:CreatePath() path:ComputeAsync(torso.Position, game.Workspace.ha.Position) local WayPoints = path:GetWaypoints() for i, WP in pairs(WayPoints) do hum:MoveTo(WP.Position) hum.MoveToFinished:Wait(2) end
I ran the code and it doesn't show any errors, but it doesn't do what it is supposed to.