How do I transition from one animation into another?

My issue is there is this millisecond fast transition from one animation to another.
I want this to be a smooth transition, I understand I could do this with the AdjustWeight function or something, But I’m at a complete lost on how do do it. I just need a little bit of help.

My current script (Which is ugly but for testing purposes…) is:

repeat wait(1 / 33) until script.Parent:FindFirstChild("Humanoid")

local Anim1 = Instance.new("Animation")
Anim1.AnimationId = "rbxassetid://123"
local PlayAnim1 = script.Parent.Humanoid:LoadAnimation(Anim1)

local Anim2 = Instance.new("Animation")
Anim2.AnimationId = "rbxassetid://1234"
local PlayAnim2 = script.Parent.Humanoid:LoadAnimation(Anim2)


PlayAnim2:Play()

wait(5)

PlayAnim1:Play()

PlayAnim2:AdjustWeight(0)
PlayAnim1:AdjustWeight(1)

Obviously it doesn’t work & as I said, I’m lost at what to do.

6 Likes

Try Adjusting the Weight before playing the animation and see if that helps.

1 Like

AnimationTrack:Play() and AnimationTrack:Stop() have a FadeTime parameter. It will fade the animation weight for the next animation. So, you can do this:

PlayAnim2:Play()

wait(5)

PlayAnim1:Play(0.5)
PlayAnim2:Stop(0.5)
16 Likes

Thank you so much. I almost lost my mind trying to figure this out, LOL.