How do you play an animation when a tool is activated?
I am trying to make an animation play when a tool is activated, but I don't know how. For some weird reason, if I equip the tool, activate it, and unequip it super fast, it shows part of the animation playing and it won't print the error message, so I think it is trying to play, but I can't see it because because the tool being equipped won't allow it to play. Can someone tell me how to play an animation when a tool is activated? I want to make a throwable pizza for a food fighting game, and I need to play a throwing animation right when the tool is activated to make my character move the tool in a way that it looks like I am throwing it. Another thing - is it possible to do this? Do I need to change my scripts?
03 | local Player = game.Players.LocalPlayer |
04 | local character = Player.Character or Player.CharacterAdded:Wait() |
05 | local Humanoid = character.Humanoid |
06 | local Animation = Humanoid:LoadAnimation(script.Throw) |
08 | script.Parent.Activated:Connect( function () |
15 | else print ( "An Error Occured" ) |