Likely NoPath. Confirm first, then fix the link endpoints.
Verify
local PFS = game:GetService("PathfindingService")
local path = PFS:CreatePath{
AgentRadius = 2, AgentHeight = 5, AgentCanJump = true,
WaypointSpacing = 8, Costs = { GapJump = 1 }
}
path:ComputeAsync(startPos, goalPos)
print("Status:", path.Status)
for i,wp in ipairs(path:GetWaypoints()) do
print(i, wp.Action, wp.Label, wp.Position)
end
If Status is not Enum.PathStatus.Success, the agent cannot reach either the start, the goal, or the link endpoints.
Fix the off-mesh link
Most common cause: the link endpoints are off the navmesh.
Place Attachment0 (takeoff) and Attachment1 (landing)
At foot height (≈ floor Y).
At least AgentRadius (2 studs) back from the edge.
On walkable, CanCollide, anchored parts.
PathfindingLink.Enabled = true
IsBidirectional = true if you need both ways.
Label = "GapJump" (exact match).
Platforms must be ≥ 4.5 studs wide (≥ 2*AgentRadius + margin) so a nav band exists.
Quick isolation test:
local link = workspace.GapJump -- your PathfindingLink
local a0, a1 = link.Attachment0.WorldPosition, link.Attachment1.WorldPosition
local test = PFS:CreatePath{AgentRadius=2, AgentHeight=5, AgentCanJump=true}
test:ComputeAsync(a0, a1)
print("Link test:", test.Status) -- if NoPath -> move attachments back/up
Use look-ahead and the correct property names (Action, Label).
local function isJumpWP(wp)
return wp
and (wp.Action == Enum.PathWaypointAction.Jump
or (wp.Action == Enum.PathWaypointAction.Custom and wp.Label == "GapJump"))
end
local path = actor.path
local i = actor.currentWaypoint
local cur = path[i]
local nxt = path[i+1]
local dxz = (Vector2.new(cur.Position.X, cur.Position.Z) - Vector2.new(actor.pos.X, actor.pos.Z)).Magnitude
if isJumpWP(nxt) and dxz <= 2 and not actor.isAirborne then
actor.isAirborne = true
actor.vy = actor.jumpVelocity
actor.pos = Vector3.new(actor.pos.X, actor.pos.Y + 0.01, actor.pos.Z)
actor.currentWaypoint += 1
return
end
if dxz < 0.5 then
actor.currentWaypoint += 1
if actor.currentWaypoint > #path then actor.path = nil; actor.currentWaypoint = nil end
return
end
local dir = cur.Position - actor.pos
dir = Vector3.new(dir.X, 0, dir.Z)
local step = math.min(remainingMove, dir.Magnitude)
if step > 0 then
local moveDir = dir.Unit
local newPosXZ = actor.pos + moveDir * step
actor.pos = Vector3.new(newPosXZ.X, getGroundY(newPosXZ), newPosXZ.Z)
local yaw = math.atan2(-moveDir.X, -moveDir.Z)
actor.rotation += (yaw - actor.rotation) * 0.35
remainingMove -= step
end
If it still won’t generate
Start/goal must be on walkable surfaces (not in air, not inside parts).
Remove any PathfindingModifier set to Blocked near the link.
Try larger AgentHeight if your actor is tall relative to ledge height.
Reduce clutter by setting WaypointSpacing = 8 to stop zig-zags.
Bottom line: move the link attachments back to be inside the nav band, then pre-jump using Action/Label look-ahead.