How would I insert specific animations into tools, such as a bomb, I made a throwing animation but how do I get it to work?
P.S. Im new to animations
Tool = script.Parent local player = game.Players.LocalPlayer repeat wait() until player.Character ~= nil local hum = player.Character:WaitForChild("Humanoid") local animation = script.Parent.ExportAnim --Change DanceAnim to the name of your animation. local AnimTrack = hum:LoadAnimation(animation) --Loads the animation into the humanoid. 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. AnimTrack:Play() end) end) Tool.Unequipped:connect(function() --If you're using a tool, change Deselected to Unequipped. Otherwise keep it the same. AnimTrack:Stop() end)
How do I get this script to play when I use the tool?