local Animation = script:WaitForChild('Animation1')
local Animation2 = script:WaitForChild('Animation2')
local humanoid = script.Parent:WaitForChild('Humanoid')
local humanoidroot = script.Parent:WaitForChild('HumanoidRootPart')
local dance = humanoid:LoadAnimation(script.Parent.Script.Animation1)
local dance2 = humanoid:LoadAnimation(script.Parent.Script.Animation2)
while true do
dance2:Play()
repeat wait() until dance2.IsPlaying == false
dance:Play()
repeat wait() until dance.IsPlaying == false
end
Don’t use Humanoid:LoadAnimation(). It already got deprecated. Use Animator:LoadAnimation() instead.
local Animation = script:WaitForChild('Animation1')
local Animation2 = script:WaitForChild('Animation2')
local humanoid = script.Parent:WaitForChild('Humanoid')
local animator = humanoid:WaitForChild("Animator")
local humanoidroot = script.Parent:WaitForChild('HumanoidRootPart')
local dance = animator:LoadAnimation(script.Parent.Script.Animation1)
local dance2 = animator:LoadAnimation(script.Parent.Script.Animation2)
while true do
dance2:Play()
repeat wait() until dance2.IsPlaying == false
dance:Play()
repeat wait() until dance.IsPlaying == false
end
Humanoid:LoadAnimation is deprecated meaning it will no longer get updated, but Animator:LoadAnimation will. There will be much more advancements in Animator rather than using Humanoid, since Animator will be getting updated.