Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I add animations to Tools?

I have a gun that I want to have a reload animation for. I can't seem to find a way to make the animation work. Can anyone tell me how to make an animation play in a tool? Thanks!

1 answer

✓ Accepted answer

You probably already know how to make an animation, and probably made one before. So to make an animation play (the simple way): insert an animation in the tool give the id the id of your animation

script (localscript):

local t = script.Parent
local an = t.Animation --any name will do
local hum = game.Players.LocalPlayer.Character:WaitForChild("Humanoid")

local animation = hum:LoadAnimation(an)

animation.Looped = true -- true or false

t.Activated:Connect(function()
animation:Play()
end)

now this is the way that its supposed to be. for like an gun you have to do alot of stuff, but i think you know how to confiure this script.

This discussion is preserved as it was. New answers, comments, and votes are closed.