01 | Tool = script.Parent |
02 | local player = game.Players.LocalPlayer |
03 | repeat wait() until player.Character ~ = nil |
04 | local hum = player.Character:WaitForChild( "Humanoid" ) |
05 | local animation = script.Parent.ExportAnim --Change DanceAnim to the name of your animation. |
06 | local AnimTrack = hum:LoadAnimation(animation) --Loads the animation into the humanoid. |
07 | Tool.Activated:connect( function (mouse) --If you're using a tool, change Selected to Activated, and get rid of the code on the next line. Otherwise, keep this the same. |
08 | AnimTrack:Play() |
09 | end ) |
10 | end ) |
11 | Tool.Unequipped:connect( function () --If you're using a tool, change Deselected to Unequipped. Otherwise keep it the same. |
12 | AnimTrack:Stop() |
13 | end ) |
I want to make a bomb so that when you use it it throws it with an animation, this is what I havebut its not working?