Here is the script I attempted to make:
script.Parent.Equipped:Connect(function(Mouse)
local animation = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.Animation)
animation:Play()
end)
So when the tool is equipped the animation should play.

2 comments
It was already in a Local Script
then dont say its a script