Pathfinding npc stopped working

Hello all, I’m trying to fix an issue with some pathfinding NPCs I made, which broke suddenly without me doing anything to them. I’m trying to fix the issue, but I seriously don’t know what’s wrong here.

The code runs fine and returns no errors, but suddenly stops at the path:GetWaypoints() line, again, with no errors. I tried printing the error to maybe see what went wrong but it just returns “Enum.PathStatus.NoPath”

local function compute(goal)
	local path = PathfindingService:CreatePath()
	path:ComputeAsync(root.Position, goal)
	local waypoints = path:GetWaypoints()
	for i, waypoint in pairs(waypoints) do
		hum:MoveTo(waypoint.Position)
		hum.MoveToFinished:Wait()
	end
	if canwalk == false then while canwalk == false do wait() end end
end

Im thinking maybe it has to do with the game’s size. It has a good chunk of terrain to it and 55k parts in it, ive been looking forever for a solution

Did you add additional waypoints? If you have and they are further from each other, the MoveToFinished has an 8 second timeout, so if your NPC doesnt reach its MoveToFinished before this timeout, then you either need to bring your waypoints closer, or just call another MoveTo before the MoveToFinished, to reset the 8 second timeout.

But this issue shouldnt prevent the NPC from even moving… its just that they will freeze up when the timeout occurs.

Well I didn’t know there was a timeout but that most likely isnt the issue. The NPCs do not move at all