Pathfinding does not work in a specific place

Hello!

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.

What could be causing this?

1 Like

Code?

30char

Here it is:

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

Could you send screenshots of any diffeerences between your actual place and the test one? Maybe any change of settings?

What kind of settings are you reffering to?

Such as studio settings, or anything that is different between the original and new testing place you made.

I havent changed any studio settings in between testing, so there is no difference there.

Since im working on a game, the first place has the map and scripts, but there is nothing affecting the rig.

Enable these 2 and check what the AI can interpret, play around with the area or add a Pathfinding Modifier
image

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.

Since its a completly flat baseplate, i dont undestand why roblox cant detect it.

I’m almost 100% sure now this is a roblox bug, and i will submit a bug report later today or tommorow.