Hello. So this is the script for the GUI button that starts the animation.
But when the player presses the animation button once, they have to click it again to stop the animation in order to be able to reselect it, so they can’t quickly press the same button multiple times. Please, could you help?
local player = game.Players.LocalPlayer local character = player.Character repeat wait() character = player.Character until character local hum = character:WaitForChild("Humanoid") local spin = hum:LoadAnimation(script.Parent.Spin) playing = false script.Parent.MouseButton1Click:connect(function() if playing == false then spin:Play() playing = true elseif playing == true then spin:Stop() playing = false end