what can I do to fix this? it does not work. pretty much what my goal is for it to play the song until the main menu is not visible.I double-checked and the names for everything are right
local song = game.Workspace.MainMenuTheme
local main = game.StarterGui.Main
repeat
song:Play()
until main.Start.Visible == false
repeat
song:Play()
until main.Voting.Visible == false
repeat
song:Stop()
until main.Start.Visible == true

2 comments
How long is your song? And also, repeat. . .until will just execute song:Play() repeatedly without delay, meaning your song is being spam restarted.
I tried if main.start.visible then and then song:play() next line didn't fix it and the song is needed to be looped as well but then stop looped when it done