Pathfinding messing up near edges

whenever the pathfinding comes to an edge, it decides to jump but then it moves the character directly back to where it was and it just keeps jumping there over and over and gets stuck

heres a video with the nav mesh on to show what im saying

all im doing is moving the humanoid to the next waypoint and then if the action of the waypoint is to jump (the green bricks in the video) then it will jump (using humanoid.Jump, not ChangeState)
anybody know how to fix it?

Without seeing your specific code, it’s hard to pinpoint the exact issue…

calculate the path

local success, returned = pcall(actor.path.ComputeAsync, actor.path, current, target)
if success and actor.path.Status == Enum.PathStatus.Success then
	waypoints = actor.path:GetWaypoints()
	waypointIndex = 1
	
	if pathOptions.showWaypoints then
		task.spawn(drawWaypoints, waypoints)
	end
	moveToNextWaypoint()
end

move along the waypoints

local function moveToNextWaypoint()
	if not actor.active then
		return
	end
	
	waypointIndex += 1
	local waypoint = waypoints[waypointIndex]
	if waypoint == nil then
		return
	end
	
	actor.humanoid:MoveTo(waypoint.Position)
	if waypoint.Action == Enum.PathWaypointAction.Jump then
		actor.humanoid.Jump = true
	end
end

move to next waypoint

trove:Connect(actor.humanoid.MoveToFinished, function(reached)
	moveToNextWaypoint()
end)

update:
for some reason when the ai is on the roof tons of waypoints appear under the roof but way above the floor
image

That is a known ROBLOX pathfinding bug and it exists for years. This is why famous zombie/ ai games rarely jump