Here is the script I attempted to make:
1 | script.Parent.Equipped:Connect( function (Mouse) |
2 | local animation = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.Animation) |
3 | animation:Play() |
4 | end ) |
So when the tool is equipped the animation should play.
game.Players.LocalPlayer
only works in a localscript, make it an localscript
you have to make 2 variables, what i mean is
1 | local animation = script.parent |
2 | local animaiontrack = animation:LoadAnimation() |