Pathfinder wont do a doable path



Pathfindingservice wont do a totally doable path and i have no idea why, its supposed to go in the maze and to the white part you can see on the right side, but instead it goes outside of the maze and around it, and says its a partial path, idk what to do right now

local function MoveTo(TargetPosition)
	Path:ComputeAsync(HumanoidRootPart.Position, TargetPosition)
	local WaypointsNumber = 1
	if Path.Status == Enum.PathStatus.ClosestNoPath then
		local Waypoints = Path:GetWaypoints()
		while task.wait() do
			repeat task.wait() SmoothTurnTo(Waypoints[WaypointsNumber]) 	until HasReached(Waypoints[WaypointsNumber])
			if Waypoints[WaypointsNumber].Action == Enum.PathWaypointAction.Jump then
				Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
			end
			WaypointsNumber += 1
		end
		
		for _, Waypoint in ipairs(Waypoints) do
			
		end
	else
		warn("Pathfinding failed: " .. Path.Status.Name)
	end
end

this is my current code, and no i dont want to hear about me doing a weird way of pathfinding, why not this way that way etc i simply want a solution if you need more details let me know


Runs out of the maze from the inside too

A couple of things you could try doing:

  • Turn on Click to Move in your settings and click on the target location. If your character manages to make it to the part, then there is something wrong with the agent specifically.
  • Double check that you are giving it the right position, sometimes silly stuff like that just happens.
  • Add a PathfindingModifier to the default baseplate below and give it a very large number. This will discourage the agent from walking on the baseplate, but even if it still chooses to do that, then there something more underlying.
1 Like

maybe agent radius is too large so it cant fit in the walls

It was the agent radius, but the question is why? Because at size 2 it would still fit, but it only works at agentradius 1

in my experience the parameters are usually off from what theyre supposed to be

or maybe it has an extra radius to make sure it can comfortably fit through the walls

1 Like

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