Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

My lobby-music should play when my lobby-gui is visible, but it doesnt, why?

So my problem is my music should play when my Lobby GUI is visible and btw my Localscript and Lobbysound are both parented to the Soundservice.

My code:

local Lobby = game.StarterGui.Lobby.background

if Lobby.Visible == true then
	script.Parent.LobbyMSC:Play()
else
	script.Parent.LobbyMSC:Stop()
end


And here is my output if it helps:

  21:13:10.384  Stack Begin  -  Studio
  21:13:10.384  Script 'cloud_340936329.GUIEditor.Plugin', Line 20  -  Studio
  21:13:10.385  Stack End  -  Studio
  21:13:11.104  Extra is not a valid member of Script "cloud_168535039.Gui Tools!"  -  Server
  21:13:11.104  Stack Begin  -  Studio
  21:13:11.104  Script 'cloud_168535039.Gui Tools!', Line 21  -  Studio
  21:13:11.104  Stack End  -  Studio
  21:13:11.700  cloud_340936329.GUIEditor.PluginTool:4: attempt to call a nil value  -  Client
  21:13:11.700  Stack Begin  -  Studio
  21:13:11.700  Script 'cloud_340936329.GUIEditor.PluginTool', Line 4  -  Studio
  21:13:11.700  Stack End  -  Studio
  21:13:11.700  Requested module experienced an error while loading  -  Client
  21:13:11.700  Stack Begin  -  Studio
  21:13:11.700  Script 'cloud_340936329.GUIEditor.Plugin', Line 20  -  Studio
  21:13:11.700  Stack End  -  Studio
  21:13:12.528  Extra is not a valid member of Script "cloud_168535039.Gui Tools!"  -  Client
  21:13:12.528  Stack Begin  -  Studio
  21:13:12.528  Script 'cloud_168535039.Gui Tools!', Line 21  -  Studio
  21:13:12.528  Stack End  -  Studio
  21:13:15.659  Disconnect from ::ffff:127.0.0.1|64319  -  Studio

1 comment

0

your output is from a GUI editor plugin, just uninstall it as it was no longer continued and is currently broken

2 answers

try this

local Lobby = game.Players.LocalPlayer.PlayerGui.Lobby.background

if Lobby.Visible == true then
    script.Parent.LobbyMSC:Play()
else
    script.Parent.LobbyMSC:Stop()
end

Did you upload the audio? if not maybe thats why, roblox made all audio over 6 seconds private. idk about you but i dont know about uploading it.

This discussion is preserved as it was. New answers, comments, and votes are closed.