|
| 21 Nov 2016 11:18 PM |
So uh,is there any way to run an animation on equip?
function OnEquipped(mouse) (Ok here's where I'm stuck.)
There's an animation in the tool called "Grip",how would I go about playing it on equipping the tool and stopping it when I put the tool away? |
|
|
| Report Abuse |
|
|
|
| 22 Nov 2016 07:26 AM |
script.Parent.Equipped:connect(function(mouse) Anim = script.Parent.Humanoid:LoadAnimation(script.Parent.Grip) Anim:Play() end)
script.Parent.Unequipped:connect(function(mouse) Anim:Destroy() end)
|
|
|
| Report Abuse |
|
|
12904
|
  |
| Joined: 29 Oct 2012 |
| Total Posts: 441 |
|
|
| 22 Nov 2016 07:54 AM |
| I recommend instead of doing :Destroy() do :Stop() |
|
|
| Report Abuse |
|
|