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