im trying to make a gui button to stop the music ?
Please encode Lua code in the Lua block code tag (look for the Lua icon in the editor).
I'm trying to make a GUI button that stops music, but when I press it nothing happens. This is my code:
01 | local music = ( 'musicplay1' ) |
03 | script Parent.MouseButton 1 ClickConnect( function () |
04 | if db = = true and music then |
06 | script.Parent.Text = ( "Music Off" ) |
07 | game.Workspace.Audio.musicplay 1 :Pause() |
10 | script.Parent.Text = ( "Music On" ) |
11 | game.Workspace.Audio.musicplay 1 :Resume() |
Can someone help me?