Does pathfinding suck, or do I suck?

I’m trying to use PathfindingService but for whatever reason the Status is returning NoPath although there is a clear path that I can see. I’m trying to create a (somewhat) efficient party-pathfinding system with proper offsets behind and to the right (or left) of the player depending on the party layout.

Now, here’s the issue. I’m trying to use Path:GetWaypoints()[1] on a loop since I can’t exactly use raycasting due to what I mentioned earlier, there is no dummy part to signify where the NPCs are supposed to go, therefore there’s no way for the raycast to be used to check if there is something blocking the NPC’s access to the character.

It sounds pretty foolproof since all of this work is being done on the Client so there’s no delay from the server or anything of the sort, however, for some reason under any circumstance the path will return Enum.PathStatus.NoPath. Every. Single. Time.

I tried even using a displacement of (0,0,16) so there’s no factor that required jumping or anything of the sort, but I still got this:

Yep, you guessed it, Enum.PathStatus.NoPath.

The warns are from another part of my script that warns me whenever a path isn’t able to be found, which is having the same issue (the whole script that controls the party and does the pathfinding.)

Any help?

My source is here:

local newPath = game:GetService('PathfindingService'):CreatePath({AgentCanJump = true, AgentHeight = Character:WaitForChild("Humanoid").HipHeight, AgentRadius = 3});

while wait() do
	if (not _G.DisablePartyMovement) then
		local e, s = pcall(function()
			for i, v in ipairs(workspace.OverworldMembers:GetChildren()) do
				local hum = v:FindFirstChild("Humanoid")
				v.Humanoid.WalkSpeed = Character.Humanoid.WalkSpeed
				--if not (isPartyInSafePlace) then break end;
				local CharCF = Character.PrimaryPart.CFrame
				local ofst;
				if (i == 1) then
					ofst = CharCF.RightVector * - 4
					ofst = ofst + CharCF.LookVector * -3
					ofst = CharCF.RightVector * (i * 3)
					ofst = ofst + CharCF.LookVector * -3
				local CharPos = CharCF.Position + ofst
				newPath:ComputeAsync(v.PrimaryPart.Position,, v.PrimaryPart.Position.Y, CharPos.Z))
				if (newPath.Status == Enum.PathStatus.Success) then
					if (isSafeToMoveTo(CharPos)) then
					placePartyInSafeArea(workspace.OverworldMembers:GetChildren(), workspace.SceneContainer:WaitForChild('Scene'))
		local x = not e and warn(s)

Edit @ 4/7/20 11:31 - I also tried running this:

local mpath = game:GetService("PathfindingService"):CreatePath(); 
mpath:ComputeAsync(workspace.Fifkee.PrimaryPart.Position, workspace.Fifkee.PrimaryPart.Position); 

…and it returned Enum.PathStatus.NoPath. How fun.

Now, here’s the very weird part. I tried running the same piece of code in the command line but added,0,4) to the ending position. I tried it on the main game, and then ran it on an empty baseplate. The main game returns NoPath, but the baseplate returns Success.

Pathfinding Service is characteristically unreliable when it comes to traversing complex structures or a majority of terrain formations. I’d recommend testing this script using a flat path and seeing if it produces the same results.

If it works on a flat path, perhaps attempting to have smaller paths connected to reach the destination would be more beneficial in this situation.


It’s all on a flat path, as I don’t really intend to use any form of complex structure (maybe a bit of unions, but they usually aren’t composed of curved paths or anything).

My game is just a testing baseplate: