Jump Animation Playing Incorrectly

  1. What do you want to achieve? Keep it simple and clear!

Make the jump animation play correctly as right now only a couple frames play

  1. What is the issue? Include screenshots / videos if possible!

As shown in the video provided there is a full working jump animation, however when it plays it does not work correctly, assumed to be a scripting error somewhere

–Where the jump animation is played

Humanoid.StateChanged:Connect(function(oldState, newState)
	if newState == Enum.HumanoidStateType.Jumping then
		jumpDebounce = true
		AnimationsTable.Jump:AdjustWeight(1)
		
		AnimationsTable.Idle:AdjustWeight(0.001)
		AnimationsTable.WalkForward:AdjustWeight(0.001)
		AnimationsTable.WalkRight:AdjustWeight(0.001)
		AnimationsTable.WalkLeft:AdjustWeight(0.001)
	elseif newState == Enum.HumanoidStateType.Landed then
		jumpDebounce = false
		AnimationsTable.Jump:AdjustWeight(0.001)
	end
end)

4 Likes

Whats your current animation priority?

Are you sure you’re setting the speed of the jump animation to 1? It’s difficult to tell because you haven’t given the full code, but it looks like you play all of them at speed 0 and then change them later on:

for _, Animation in AnimationsTable do
    Animation:Play(0, 0.001, 0) --> jump anim has speed 0...
end

--- ... ---

jumpDebounce = true
AnimationsTable.Jump:AdjustWeight(1)
-- Hypothesis:
-- The code here doesn't seem to call Jump:AdjustSpeed,
-- So maybe Jump anim still has speed 0, so it never moves past the first keyframe?
AnimationsTable.Idle:AdjustWeight(0.001)
1 Like

You’re that that is the solution it does fix the problem however maybe i’m overseeing something here but it only fixes it once,

It will play the jump animation however on the second time I jump nothing happens, probably something again with the speed i’m missing but I don’t see it


Humanoid.StateChanged:Connect(function(oldState, newState)
	if newState == Enum.HumanoidStateType.Jumping then
		jumpDebounce = true
		AnimationsTable.Jump:AdjustWeight(1)
		AnimationsTable.Jump:AdjustSpeed(1)
		
		AnimationsTable.Idle:AdjustWeight(0.001)
		AnimationsTable.WalkForward:AdjustWeight(0.001)
		AnimationsTable.WalkRight:AdjustWeight(0.001)
		AnimationsTable.WalkLeft:AdjustWeight(0.001)
	elseif newState == Enum.HumanoidStateType.Landed then
		jumpDebounce = false
		AnimationsTable.Jump:AdjustWeight(0.001)
		AnimationsTable.Jump:AdjustSpeed(0.001)
	end
end)

Edit: Fixed it

1 Like

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