as you might have known by the title, i have made a script that plays a random sound inside a folder called MusicLobby, it was working fine back then, but now it doesnt work anymore and i did not change it. Well...it DOES work in STUDIO but not INGAME, and that makes me really confused...anyways here is the script that i made.

local trackslobby=workspace.MusicLobby:GetChildren()
local chooselobby=math.random(1,#trackslobby)
local trackl=trackslobby[chooselobby]
trackl:Play()

oh and also this script itself is in ServerScriptService, this is not actually the ENTIRE script, but i figured out that this specific part is the one that is breaking the script, hope you guys understand.

2 comments

0

The parent of "MusicLobby" is Workspace right? And is everything in "MusicLobby" sound?

0

Yes workspace is the parent of MusicLobby and everything inside it are only sounds