So I'm tiring to make a customizable music playlist. The player hits buttons in their Gui and it puts specific songs into a folder in the workspace. To turn off the songs, the player pushes the button again and it moves the song back into a folder in the players Gui. The songs are originally in that folder. There is a script in that folder in workspace that randomly plays a song from the folder in workspace:
while wait(3) do local Strings = script.Parent:GetChildren() local st = Strings[math.random(1, #Strings)] if (st == game.Workspace.SongsInUse.Script) then else st:Play() st.Ended:Wait() end end
In the folder that is in the players GUI that holds the songs there is a script to make sure that the songs in the folder do not play while in that folder:
while wait(3) do local children = script.Parent.Songs:GetChildren() for i = 1, #children do local child = children[i] child:Stop() end end
When the songs are put in workspace they play, and when put into the folder they stop playing, but when they are again put into the folder in the workspace, they do not play, can someone help me.