my pathfindingservice ai is jumping mid air i have already tried hum.jump = true but that makes the ai get stuck and miss jumps
script: (unirrelevant pieces of code not included)
local path = pathfindingService:CreatePath{AgentCanClimb = true, AgentCanJump = true}
path:ComputeAsync(root.Position, destination)
local waypoints = path:GetWaypoints()
for k, waypoint in pairs(waypoints) do
hum:MoveTo(waypoint.Position)
if waypoint.Action == Enum.PathWaypointAction.Jump then
hum:ChangeState(Enum.HumanoidStateType.Jumping)
end
hum.MoveToFinished:Wait()
end