Why won't this work? It only prints the first one.
wait(1) print("Script has started!") while true do local Sounds = script.GetChildren() local Random = math.random(1,#Sounds) local RandomSound = Sounds[Random] print(RandomSound) workspace.CurrentPlaylist.SurfaceGui.TextLabel.Text = "Currently Playing: "..RandomSound RandomSound:Play() wait(RandomSound.TimeLength) end
Images: https://i.gyazo.com/8e0facb3659c961e6bb8145827ccfdd5.png https://i.gyazo.com/18e3098d81bf2ec4f421e43776b4a17e.png
wait(1) print("Script has started!") while true do local Sounds = script:GetChildren() -- here was the problem local Random = math.random(1,#Sounds) local RandomSound = Sounds[Random] print(RandomSound) workspace.CurrentPlaylist.SurfaceGui.TextLabel.Text = "Currently Playing: "..RandomSound RandomSound:Play() wait(RandomSound.TimeLength) end