Animation playing weirdly

  1. What do you want to achieve?
    For the animations to transfer smoothly

  2. What is the issue?
    The animation returns to the no animation mode part for a split second before playing (I have never encountered this so sorry if I don’t know the name of it)

  3. What solutions have you tried so far?
    I tried putting a wait and swapping when they transfer, but it hasn’t fixed anything.

function Idle()
	if Aiming then
		AimToIdle1:Play()
		task.wait()
		Aim1:Stop()
		task.wait(AimToIdle1.Length)
	end
	Idle1:Play()
	Aiming = false
	Idleing = true
end

function Aim()
	if Idleing then
		IdleToAim1:Play()
		task.wait()
		Idle1:Stop()
		task.wait(IdleToAim1.Length)
	end
	Aim1:Play()
	Idleing = false
	Aiming = true
	AimingDuration = tick()
end

task.wait(5)
Idle()
task.wait(8)
Aim()

try changing the animation priority to action

I don’t think that’s the issue, it was working before but now it doesn’t.

instead of doing Idle() or Aim() try doing Idle(1) or Aim(1)

Something like this occurred when i was working on one of my projects. instead of

task.wait(number)

you should have

task.wait(your animation track.Length)

This also might work aswell.