I have a humanoid NPC that will travel to a certain part using pathfinding service.
The path model as I see clearly, has a direct path to the target. But the status is deemed ClosestNoPath which means it cannot find a path so it gets the closest coordinates.
Why does this happen?
local path = game:GetService("PathfindingService"):ComputeRawPathAsync(script.Parent.HumanoidRootPart.Position, game.Workspace.SpecificObject.Position + Vector3.new(1, 0, 1), 500)
if not path.Status == Enum.PathStatus.Sucess then
print(path.Status)
elseif path.Status == Enum.PathStatus.Success then
script.Parent.Humanoid:MoveTo(path:GetCoordinates()[2])
end
And how can I fix it?
-Server script
-Inside a NPC model in Workspace
-Filtering Enabled game

2 comments
I'll try and test this. There is no barrier blocking the path. I even literally put SpecificObject on the NPC. (SpecificObject is non-collidable.)
Like i said, Roblox's pathfinding sucks.