Animation transition

This script is supposed have a transition when it swaps animations however it does not work and i can’t seem to figure out why!
When i remove the transition parts it works but i want a transition!
can someone help me?

local lighting = game.Lighting

local night = 18
local day = 6

local anim1 = script.Parent.BaseAnimate
local change_anim = script.Parent.Humanoid:LoadAnimation(anim1.idle.Animation1)

while true do
	task.wait(1)
	if lighting.ClockTime > day and lighting.ClockTime < night then
		change_anim:Play()
		change_anim.Stopped:Wait()
		anim1.idle.Animation1.AnimationId ="rbxassetid://17639503317"
		anim1.idle.Animation2.AnimationId ="rbxassetid:// 17639503317"
		anim1.walk.WalkAnim.AnimationId ="rbxassetid://17639505779"
		anim1.run.RunAnim.AnimationId = "rbxassetid://17639509045"
	else
	  change_anim:Play()
	  change_anim.Stopped:Wait()
		anim1.idle.Animation1.AnimationId ="rbxassetid://17639512359"
		anim1.idle.Animation2.AnimationId ="rbxassetid:// 17639512359"
		anim1.walk.WalkAnim.AnimationId ="rbxassetid://17639521313"
		anim1.run.RunAnim.AnimationId = "rbxassetid://17639527968"
	end
end 

What do you mean by transition? And what specific animation do you want to transition into?

the thing is the script without the “transition” works but the animations are only different when i move but i want it to transition instead of having to move to see the change

you have spaces in the animation ids i think thats why

it was like that before i added the transition parts and it worked

theres a while loop that plays the change animation every second so that might be the issue

the thing is the animations won’t change unless

local change_anim = script.Parent.Humanoid:LoadAnimation(anim1.idle.Animation1) change_anim:Play() change_anim.Stopped:Wait()
are removed and when it is removed i have to move to see the animations change

Just gonna start another post with this but something else

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