I just researched it and found a fix
HandsUpAnimationButton.MouseButton1Click:Connect(function()
if not LoadAnimation.IsPlaying then
LoadAnimation:Play()
else
LoadAnimation:Stop()
end
end)
I just researched it and found a fix
HandsUpAnimationButton.MouseButton1Click:Connect(function()
if not LoadAnimation.IsPlaying then
LoadAnimation:Play()
else
LoadAnimation:Stop()
end
end)
You needed local Playing
/local Playing = nil
/local Playing = false
at the top of the script and Playing = not Playing
at the top of the function.
You could also just use the animation’s state (which you ended up doing).