I'm trying to make a GUI button that stops music, but when I press it nothing happens. This is my code:
local music = ('musicplay1') db = true script Parent.MouseButton1ClickConnect(function() if db == true and music then db = false script.Parent.Text = ("Music Off") game.Workspace.Audio.musicplay1:Pause() else db = true script.Parent.Text = ("Music On") game.Workspace.Audio.musicplay1:Resume() end end)
Can someone help me?