Issue with animation playing together

2 animations playing together in a smooth way: i want it so that the jump anim and the fall anim to play together in a smooth way, exactly like in this example:

the issue is that the jump anim stuns the player in the air before transitioning to the fall anim, same for the fall anim, which doesn’t transition well either to landing state for the character
here’s a video of the issue:

i looked far and wide in the devforum and no solutions.

please note that some might argue that this is an animation problem, but no matter how i change the animation itself and the last keyframe, the problem is still the same.

here’s the code for this:

local function ONTouch()
	if not player.Character then
		player.CharacterAdded:Wait()
	end
	local character = player.Character

		local jumpAnimation = Instance.new("Animation")
		jumpAnimation.AnimationId = jumpAnimationId

		local fallAnimation = Instance.new("Animation")
		fallAnimation.AnimationId = fallAnimationId

		local jumpTrack = humanoid:LoadAnimation(jumpAnimation)
		local fallTrack = humanoid:LoadAnimation(fallAnimation)

		-- Set animation priorities
		jumpTrack.Priority = Enum.AnimationPriority.Action4
		
		
		fallTrack.Priority = Enum.AnimationPriority.Action3
		fallTrack.Looped = true
		
		-- Connect the jumping event
		humanoid.StateChanged:Connect(function(oldState, newState)
			if newState == Enum.HumanoidStateType.Jumping then
				jumpTrack:Play()
				jumpTrack:AdjustSpeed(1.8)
			elseif newState == Enum.HumanoidStateType.Freefall then
				-- Check if the jump animation is playing before playing fall animation
				if not jumpTrack.IsPlaying then
					fallTrack:Play()
					fallTrack:AdjustSpeed(2)
				else
					-- Wait until the jump animation finishes, then play the fall animation
					jumpTrack.Stopped:Wait()

					fallTrack:Play()
				end
			elseif newState == Enum.HumanoidStateType.Landed then
				fallTrack:Stop()
			end
		end)

end
startCrossLine.Touched:Connect(ONTouch)

update: when you set jumpanim into looped, it doesn’t stun, how can you make it so that the jumpanim would backflip once and then return end

i fixed the problem, the problem was because i used the move tool and moved the torso in the jumpanim, which roblox for some reason doesn’t transition well, so it looks like it just teleports

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.