i wanted to play animation1 first then animation and then again animation1 as i am making a sword
local plr = game.Players.LocalPlayer
local character = plr.Character or plr.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local sound = script.Parent.Handle.OverheadSound
local sound2 = script.Parent.Handle.UnsheathSound
local animations = "rbxassetid://6779827280"
local animation1 = "rbxassetid://6780070275"
local animationplayer = script.Parent.Handle.Animation
local CanAttack = true
script.Parent.Activated:connect(function()
if animationplayer.AnimationId == animation1 then
CanAttack = false
animation1:Play()
animationplayer.AnimationId = animations
wait(0.2)
CanAttack = true
else
CanAttack = false
animations:Play()
animationplayer.AnimationId = animation1
wait(0.2)
CanAttack = true
end
end)
local idelanim = script.Parent.Handle.asd
local idealanimation = humanoid:LoadAnimation(idelanim)
script.Parent.Equipped:Connect(function()
idealanimation:Play()
sound2:Play()
end)
script.Parent.Unequipped:Connect(function()
idealanimation:Stop()
end)

1 comment
This is actually true. The animation ID can not play by itself. Only the animation instance can. Also, only the animator can load animations. If you see humanoid:LoadAnimation, that id deprecated.