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?
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