How to make snappy transitions?

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

I’m making a tower defense game inspired by BTD6, Tower Blitz and Aether Rush. I want it to have a retro style with blocky/snappy animations. I also want to add multiple upgrade system, notably the one in BTD6 with 3 paths or a branching upgrades that makes the tower stronger.

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

When animations are played, it’s all fine. The animations are snappy and blocky. The problem is when it ends and it defaults to the idle animation. It transitions in a linear way, but I want it to have no transition (“constant” in animation)

Here’s some footage:

robloxapp-20240128-1423144.wmv (7.1 MB)

As you can see, when the recon (the guy with a pistol) stops the shooting animation, it takes a second to play the idle animation. In that time, it transitions in a linear way. For the sword tower, I am absolutely lost on how to fix it. It charges, then default to the idle animation, then attacks? I’m not an expert in animations so any help would be extremely appreciated!

I think the problem is when stopping animations, because when the script plays the animations, it does that instantly, but when it needs to stop, it makes it bad.

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I did look at multiple posts having the same issue. I made all fadetimes in my function 0.01.

The function to play animations / stop others:

function playAnim(playedAnim, stopAnims, speed, weight)
	if not weight then weight = 1 end
	if not speed then speed = 1 end

	if stopAnims then 
		for i, v in stopAnims do 
			v:Stop(0.01) end end

	playedAnim:Play(0.01, weight, speed)
end

Here’s a part of my script that plays the idle animation when the shooting/attacking animation has finished:

animation2.Ended:Connect(function()
	playAnim(animation1)
end)

That’s pretty much it. I made another post a while ago similar to this one, but it wasn’t answered. Any help would be appreciated, because I’ve been stuck on this issue for almost a month. Cheers.