Animation plays slowly and doesn't work properly

You can write your topic however you want, but you need to answer these questions:

  1. **What do you want to achieve?
    I need my animation to play at the correct speed and end at the top
    this is what it looks like in the animation editor: (on loop)
    https://gyazo.com/7db19682948a3504e0907ee6fd8c4d4d

  2. **What is the issue?
    it plays slowly in game, and doesn’t completely finish
    here is in game (I activated the animation multiple times)
    Baseplate - Roblox Studio (gyazo.com)

here is the code for this part of the animation, every other animation works fine

elseif not processed and OnPad and input.KeyCode == Enum.KeyCode.Space then
		InSwing = true;
		
		SwingUpTrack:Play();
		SwingUpTrack:GetMarkerReachedSignal("END"):Connect(function(paramString)
			SwingUpTrack:Stop(0)
			print("End")
			SwingUpShakeTrack:Play()
		end)
	end

Any help is apreciated as I’m new to animation, thanks.

you are putting the KeyFrame far away from the first KeyFrame, Extend your AnimationEditor, you are putting it to around .5 Seconds

Should look like this:

Not this:


this is what I have now, it still sort of cuts off half way through, just slower this time
https://gyazo.com/d675015fb917b85b25ea6ac59005e1af

Make sure you do this:

Closer = Faster

Further = Slower

(Thank you Studio for helping to Explain, lol)

Timeline Length pretty much means how long it takes for a certain Animation and KeyFrames to Play

I’m thinking it’s a code issue because I have the same thing and just noticed this


it prints end once the first time, then twice the next time, and so on and so on
Baseplate - Roblox Studio (gyazo.com)

just realised I’m creating a seperate function each time I press space which isnt what i want (fixed that, but the original problem of the animation cutting off still happens)

it isnt your script, the script appears to simply plays the animation