Animation Shift to Run Not working with player has jump Already

Today I have been trying to figure out why my animation won’t play when the player is running and then jump and then animation stops :confused:

Code
local function Handler(actionName, inputState, inputObject)
	if actionName == "Run" then
		if inputState == Enum.UserInputState.Begin then
			Humanoid.WalkSpeed = 50
			RunAnimation:Play()
			Runing = true
		end
		if inputState == Enum.UserInputState.End then
			if RunAnimation.IsPlaying then
				RunAnimation:Stop()
			end
			Humanoid.WalkSpeed = 16
			Runing = false 
			
		end
	end
end


ContextActionService:BindAction("Run",Handler,false, Enum.KeyCode.LeftShift,Enum.KeyCode.RightShift)

 Humanoid.Jumping:Connect(function(isActive)
	if isActive == false and Runing == true then
		RunAnimation:Play()
	end
end)
1 Like