So I made a functioning script to play music when I clicked a text button, but now I am struggling to know what to add to my script to make the music stop when I click the same button. Here's what I have so far!
local button = script.Parent
function playmusic() game.Workspace.Music.ArianaGrande7Rings:Stop()
game.Workspace.Music.ArianaGrande7Rings:Play()
end
button.Activated:Connect(playmusic)

1 comment
sorry, i missed the Gui part, but the code can work for a text button too