Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 2 years ago

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
0
your output is from a GUI editor plugin, just uninstall it as it was no longer continued and is currently broken User#31501 0 — 2y

2 answers

Log in to vote
0
Answered by 2 years ago

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
Ad
Log in to vote
0
Answered by 2 years ago

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.

Answer this question