I am trying to make a toolnone animation for a sword, and the animation is not looped. Using this localscript, I make the animation loop when the player equips the sword, but when they unequip it, it's supposed to stop looping the animation but it doesn't
local equipped = false
local cooldown = false
local plr = game.Players.LocalPlayer
wait(0.1)
local toolnone = plr.Character.Humanoid:LoadAnimation(plr.Character.Animate.toolnone.ToolNoneAnim)
script.Parent.Equipped:Connect(function()
equipped = true
plr.Character.Animate.toolnone.ToolNoneAnim.AnimationId = "rbxassetid://4755516202"
local toolnone = plr.Character.Humanoid:LoadAnimation(plr.Character.Animate.toolnone.ToolNoneAnim)
toolnone:Stop()
wait(0.1)
toolnone.Looped = true
toolnone:Play()
end)
script.Parent.Unequipped:Connect(function()
equipped = false
toolnone.Looped = false
wait(0.1)
toolnone:Stop()
plr.Character.Animate.toolnone.ToolNoneAnim.AnimationId = "rbxassetid://507768375"
end)

1 comment
why did u make 2 toolnones