Pathfinding returning NoPath, although one exists. [NOT REPOST]

First and foremost, this isn’t a repost. I’ve looked everywhere at all issues regarding this, and have come up with nothing.

  • There is no Humanoids under workspace.
  • There is no obstructions
  • The height should be at a viable range
  • The map extends are 2048x2048.

Currently I’m rendering an NPC on the client; and then using PathfindingService to calculate a path for this NPC to follow. However, the path results is constantly returning “NoPath”


The Y-Axis for both the point, alongside the NPC’s HumanoidRootPart are the same.

function Pathfinder:Start()
	local Tries = 0;
	
	self.Agent = PathfindingService:CreatePath({
		AgentCanJump = true,
	})
	
	local function AttemptToCreateValidAgent()
		task.wait(.1)

		local Success, ErrorMessage = pcall(function()
			self.Agent:ComputeAsync(self.Model.PrimaryPart.Position, self.Vector)
		end)
		
		print('Waypoints:', self.Agent:GetWaypoints())
		print('Status ('.. Tries ..') :', self.Agent.Status)
		
		if not (self.Agent.Status == Enum.PathStatus.Success) then
			Tries += 1;
			if Tries > 50 then return false end
			
			return AttemptToCreateValidAgent()
		end
		
		return true
	end
	
	self.Thread = coroutine.create(function()
		local Success = AttemptToCreateValidAgent()
		print(Success)
		
		if not Success then return end

		self.Waypoints = self.Agent:GetWaypoints()
		print(self.Waypoints)
	end)
	
	coroutine.resume(self.Thread)
end
1 Like

is the self.Vector variable valid? Also is the pcall a success and if not what did it return?

im also having this issue, did you manage to fix it?