Hey guys i was using pathfinding service but i came onto a problem. First off compute async was working - used a pcall to determine that - however when i printed path status it came back with PathStatus.NoPath. Im really confused
Any help would be greatly appreciated.
here is the code
local path = PathFindingService:CreatePath()
local w,l = pcall(function()
path:ComputeAsync(npc:WaitForChild('HumanoidRootPart').Position,queuespace.Position)
end)
print(w,l)
if path.Status ~= Enum.PathStatus.Success then
print(path.Status)
--returning .NoPath
else
local waypoints = path:GetWaypoints()
print(waypoints)
for i,waypoint:PathWaypoint in pairs(waypoints) do
print('done1')
npc.Humanoid:MoveTo(waypoint.Position)
npc.Humanoid.MoveToFinished:Wait(2)
end
end
end