How do I stop the animation when the tool is unequipped?
Asked by
5 years ago Edited 5 years ago
01 | local Player = game:GetService( "Players" ).LocalPlayer |
03 | local Tool = script.Parent |
05 | local Handle = Tool:WaitForChild( "Handle" ) |
18 | script.Parent.LocalScript.Disabled = true |
19 | script.Parent.GunScript.Disabled = true |
24 | script.Parent.LocalScript.Disabled = false |
25 | script.Parent.GunScript.Disabled = false |
29 | Tool.Unequipped:Connect( function () |
31 | script.Parent.GunScript.Disabled = false |
32 | script.Parent.LocalScript.Disabled = false |
33 | local StopAnim 1 = Humanoid:LoadAnimation(script.Parent.Fire) |
34 | local StopAnim 2 = Humanoid:LoadAnimation(script.Parent.Hold) |
35 | local StopAnim 3 = Humanoid:LoadAnimation(script.Parent.Reload) |
41 | Mouse.KeyDown:connect( function (key) |
Hello, I am trying to script a gundown script, this is a local script in a tool and it disables the scripts that lets the player shoot, but the issue is that the Animation isn't stopping when the tool is unequipped.