Stop idle and run animations from playing after tool is unequipped?
Asked by
4 years ago Edited 4 years ago
If you scroll down and look for the unequipped function, that's the part that doesn't work. When I unequip my tool the idle and run animations should stop, but they still play.
Heres a short video of me unequipping it, idk how to use gyazo that well
https://gyazo.com/104197d47e30d4cc1c155023619c7dd8
02 | humanoid = script.Parent.Parent.Humanoid |
04 | Running = script.Parent.Running |
05 | Idle = script.Parent.Idle |
06 | Attack = script.Parent.Attack |
09 | runAnim = humanoid:LoadAnimation(Running) |
10 | idleAnim = humanoid:LoadAnimation(Idle) |
11 | attackAnim = humanoid:LoadAnimation(Attack) |
14 | lookForIdle = script.Parent.Idle |
15 | lookForRun = script.Parent.Running |
16 | lookForAttack = script.Parent.Attack |
18 | script.Parent.Equipped:Connect( function () |
19 | humanoid.Running:Connect( function (speed) |
31 | script.Parent.Unequipped:Connect( function () |
38 | script.Parent.Activated:Connect( function () |
42 | humanoid.WalkSpeed = 0 |
46 | humanoid.WalkSpeed = 16 |