So, right now im making my custom animation but my script isnt working. Its a local script and its inside of my tool. The tool is a ball (the material is granite) and its only a single part, but it does have a particle emitter in it.
player = game.Players.LocalPlayer
repeat wait(0.001) until player.Character
character = player.Character
Canswing = true
animation = character.Humanoid:WaitForChild(script.Parent.OrbOfFury)
script.Parent.animation:play(function()
end)
My animationID is here: https://www.roblox.com/library/576159820/Orb-of-fury
When I test it it says: OrbOfFury is not a valid member of Tool
Please Help!

6 comments
Thankyou!
hmm, I dont know why its not working. I replaced the loadAnimation for waitforchild but now when I equipt the item the hand stays in the usual idle roblox pose
It is because you are not Playing the animation anywhere in the code. Use
animation:Play().ok
Still coming up with the error
What does the error say?