Enum.PathStatus.NoPath being returned?

Hello!

I am not sure why but my pathfinder is returning NoPath.

This is where it starts and where it ends.

Script:

						local path = pathfindingService:CreatePath({['AgentCanJump'] = true})
						dummyHandler:DoPath(
							tutorialInfo.Jump.Dummy,
							path,
							tutorialInfo.Jump.DummyWaypointInfo.Beginning, -- a vector3
							tutorialInfo.Jump.DummyWaypointInfo.End -- also a vector3
						)

DummyHandler:

        path:ComputeAsync(startPos, endPos)
		print(path:GetWaypoints()) -- prints {}
		print(path.Status)
		for i,v in ipairs(path:GetWaypoints()) do
			print(v.Position) -- not being printed bc the length of getwaypoints is 0
			if v.Action == Enum.PathWaypointAction.Jump then
				dummy.Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
			end
			dummy.Humanoid:MoveTo(v.Position)
			print(v.Position)
			dummy.Humanoid.MoveToFinished:Wait()
		end

TIA for any help! :smile:

Another thing, I tried print(path:CheckOcclusionAsync()) and it’s returning -1 which means there’s nothing blocking it. No idea what is going on.

Okay, this is driving me insane, I have no idea what’s going on.

I’ve looked here and on scriptinghelpers and haven’t found anything that worked. I also tried filling any gaps, no idea where to go from here.

It prints the no NoPath enum. I’ve tried to print the length of the table and it prints 0

Try checking if there’s a humanoid right under the workspace or if there’s a part below the workspace’s fallenpartsdestroyheight. If there are then delete them. (or you can just move it up if it’s below the fallenpartsdestroyheight) I have had this problem countless times before and those were solutions to it.

1 Like

try changing the Agent parameters of CreatePath
(maybe the AgentRadius)

No, it should work normally. I can’t figure out why it’s returning Enum.PathStatus.NoPath but it should work as expected.

@junior516 - No parts below the workspace’s fallenpartsdestroyheight. My gosh, it was a humanoid in the workspace, I feel like an idiot :man_facepalming:

No idea how the parts below fallenpartsdestroyheight does it but my guess for the humanoid is floating point errors maybe?

There was a human in my workspace too!

1 Like