How to make an animation with a tool?

Hello!

I want to make an computer animation that when you use the tool, there will be a typing animation.

I have the animations ready but I don’t know how can I do that.

Thanks for reading!

2 Likes

Hello.

By making an animation with a tool, do you mean playing the Animation once the Tool is Clicked, or Equipped?

1 Like

Not when you equiped. When you equip and clicked to gain some of the in-game currency the animation will be played

Ah, what you need to do is Insert the Animation object into your tool, and changing the AnimationId to the Roblox ID of your Animation. Make sure your animation is saved to Roblox so you are able to get the ID for it. Then, you want to create a LocalScript, and create the function that makes your animation plays when the script detects a MouseButton click.

Everything that I said, including the code you need to play the animation, is mentioned in this Tutorial.

Code from the video:

script.Parent.Equipped:Connect(function(Mouse) 
    Mouse.Button1Down:Connect(function()
        animation = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.Animation)
        animation:Play()
    end)
end)

script.Parent.Unequipped:Connect(function()
    animation:Stop()
end)
3 Likes

Let me know if this helped you and if this is the solution to your question!