Why does animation still play when tool unequips?
Asked by
3 years ago Edited 3 years ago
I want to make it where when i equip a tool a animation plays, and when i unequip it, the animation should stop. When i unequip it, the animation still plays.
help
01 | local Tool = script.Parent |
02 | local Animation = Tool.Animation |
08 | Tool.Equipped:Connect( function () |
10 | local Player = Tool.Parent |
11 | local Humanoid = Player.Humanoid |
12 | local Animator = Instance.new( "Animator" ) |
14 | local AnimationPlay = Humanoid.Animator:LoadAnimation(Animation) |
22 | Tool.Unequipped:Connect( function () |
24 | local Player = Tool.Parent |
25 | local Humanoid = Player.Humanoid |
26 | local Animator = Instance.new( "Animator" ) |
29 | local AnimationPlay = Humanoid.Animator:LoadAnimation(Animation) |