How do I add a custom animation to my tool? I am scripting a cafe and I made the model and tool for my cup and made the animation. How do I make it so that when the player is holding it, and you click, it plays the animation? Please help! <3
--This is for when you have it equipped and click with it local Tool = script.Parent local animation = Instance.new("Animation") animation.AnimationId = "http://www.roblox.com/Asset?ID=144884906" --Replace with your animation Tool.Activated:connect(function() local animTrack = Humanoid:LoadAnimation(animation) animTrack:Play() end)
--This is for when you equip it and nothing else local Tool = script.Parent local animation = Instance.new("Animation") animation.AnimationId = "http://www.roblox.com/Asset?ID=144884906" --Replace with your animation Tool.Equipped:connect(function() local animTrack = Humanoid:LoadAnimation(animation) animTrack:Play() end)