My tool is supposed to play a animation that when I click on it it plays a animation but my tool isn't doing that its doing the opposite when the animation is supposed to play when equipped its not playing when equipped it only plays when i equip the weapon and I have clicked to fire the event
here is my local script on this tool
tool = script.Parent
animation = tool:WaitForChild("Animation")
equip = false
tool.Activated:Connect(function()
if equip == true then
Hum = tool.Parent:FindFirstChild('Humanoid')
Hum:LoadAnimation(animation):Play()
end
end)
tool.Equipped:Connect(function()
equip = true
end)
tool.Unequipped:Connect(function()
equip = false
end)

1 comment
The activated event fires when the tool is equipped and then clicked, if you want the animation to play as soon as you equip the weapon, then simply move the code block pertaining to the animation being loaded into the Equipped function