Im currently working on new npc’s for my game using PathfindingService, but im getting a path status of NoPath everytime. I was extremly confused on why it always failed, so it set up a little experiment.
I copied over the exact same npc, the exact same pathfinding script, the exact same baseplate and the exact same destination part over to an empty place, where it worked perfectly on the first try.
local path = game:GetService("PathfindingService"):CreatePath()
path:ComputeAsync(script.Parent.HumanoidRootPart.Position, workspace.Randompar.Position)
if path.Status == Enum.PathStatus.Success then
print("path success")
for index, wp in pairs(path:GetWaypoints()) do
script.Parent.Humanoid:MoveTo(wp.Position)
script.Parent.Humanoid.MoveToFinished:Wait()
end
else
print("nopath")
end
Randompar is my destination part and the script is parented inside a rig
After enabling those 2 settings, im noticing something really odd. On the place that pathfinding fails on, i dont see any navigation meshes or labels, but on the place that pathfinding works, i can see the navigation meshes and labels.
That’s because Roblox can’t detect it as a walkable area, it sometimes happens in more complex areas.
You can try and fix it by adding additional invisible parts under or adding pathfinding modifiers to correct the system. Just play around with it until you get the navigation mesh to go over the area.