Try reordering the sequence of events to see if it’s code-related. It could be something about the destination or path it’s taking that’s causing an issue.
Oh, it might be because you have multiple MoveToFinished events. Try only using one event. Maybe this will work:
local destination = 1
local endDestination = 7
script.Parent.Humanoid.MoveToFinished:Connect(function()
destination += 1
if destination <= endDestination then
script.Parent.Humanoid:MoveTo(workspace["Outside"..destination].Position)
end
end)
script.Parent.Humanoid:MoveTo(workspace["Outside"..destination].Position)
The reach goal state of a humanoid will timeout after 8 seconds if it doesn’t reach its goal. This is done so that NPCs won’t get stuck waiting for Humanoid.MoveToFinished to fire. If you don’t want this to happen, you should repeatedly call MoveTo so that the timeout will keep resetting.
Throw a loop into the mix and it should be good to go. Alternatively, you could add more points if you don’t want to do that.
The script becomes an endless loop after the script.Parent.Humanoid:MoveTo(game.Workspace.Outside3.Position) function. Now, when the NPC finishes the movement to Outside3, it just fires the MoveFinished event that is above it, not below, since the one above was defined earlier.