I have been trying to make a two handed gun for my game using a animation, but i can't make it stop when i want it to. I'm stumped
Can anyone help? Thanks in advance
My last attempt(inside localscript):
script.Parent.Equipped:Connect(function()
animation = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.GunIdle)
animation:Play()
end)
script.Parent.Unequipped:Connect(function()
animation = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.GunIdle)
animation:Stop()
end)
Also would like to add, no errors are produces. Link to gif: https://gyazo.com/89aa581f12f434344febb75ce4149007

4 comments
It produces this error: https://gyazo.com/2b0fcb997d8ba148977679d2a19cc720
Also here's my set up of the gun: https://gyazo.com/2c72b473fe697ae71c5b1bfec75beb57
@BashGuy10 Updated answer
Thanks! It worked