PathfindingService keeps throwing no path

Hey, I was making a pathfinding npc and it’s supposed to follow this path.
image

But for some reason the path is never computed. It always says “NoPath” in the status.
Here’s the entire workspace, the baseplate has CanCollide turned off. The Start and End blocks also have have collision turned off.
image

I use this to generate a path.

GeneratePath module
local module = {}

function module.Gen(MAP)
	local p = game.PathfindingService:CreatePath({
		AgentCanJump=false,
		AgentRadius=1,
	})
	
	p:ComputeAsync(MAP.Start.Position,MAP.End.Position)
	print(p.Status)
	local w = p:GetWaypoints()
	
	return w,p.Status
end

return module

But for some reason everytime the path isn’t computed right. No errors.

Thanks.

For some reason sometimes I move it up and the pathfinding works, but I move it to another place and it stops working.

You could try using pathfinding links. [Full Release] Introducing the Pathfinding Links for NPCs

I don’t understand how they would be useful, my path wont even generate. I just want the mob to follow a path.

Plus if I connect a pathfinding link to the start and end, it just tweens the object to the end. Doesn’t even follow the path.

Hi,

Could we please get a repo file, so we can investigate what is happening.

1 Like

Hi,

Sorry for the late reply, I haven’t been on the forums for a bit.
Here’s the Game File from when I posted:
TowerDefenseThingt.rbxl (48.3 KB)

Hi, Thanks for the repo. I do see that navmesh is have gaps in between and since you are setting AgentCanJump = false, it cant generate the path. However we will investigate why there is a gap in the navmesh
image

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.