Oh, sorry. I already solved this problem. Forgot to put a solution here.
Basically what am I doing, is checking if player has jumped and stuff:
-- humanoid statechanged is working too, but this is just an example
runService.RenderStepped:Connect(function()
if humanoid:GetState() == Enum.HumanoidStateType.Jumping or humanoid:GetState() == Enum.HumanoidStateType.FallingDown or humanoid:GetState() == Enum.HumanoidStateType.Freefall or humanoid:GetState() == Enum.HumanoidStateType.Flying or humanoid:GetState() == Enum.HumanoidStateType.Climbing then
midAir = true
else
midAir = false
end
end)
if not sprintAnimation.IsPlaying and not midAir then
sprintAnimation:AdjustWeight(6)
sprintAnimation:Play(0.4)
elseif sprintAnimation.IsPlaying and midAir then
sprintAnimation:Stop(0.1)
end