|
| 03 Apr 2017 01:04 PM |
I know how to make a normal one, but how do you make it go
Song 1
Wait until it's done
Song 2
Wait until done
Song 3
What until done
Repeat ? |
|
|
| Report Abuse |
|
|
Atavis
|
  |
| Joined: 10 Apr 2012 |
| Total Posts: 1463 |
|
|
| 03 Apr 2017 01:06 PM |
songs = {}
while true do for _, v in pairs(songs) do sound.SoundId = "rbxassetid://" .. v repeat wait() until sound.IsLoaded sound:Play() wait(sound.Length) sound:Stop() end end
112,768 slices of pizza and counting! |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 03 Apr 2017 01:09 PM |
repeat wait() until sound.TimeLength >0 -- it starts at 0 sometimes and will skip tracks before it initializes them wait(sound.TimeLength) Sound:Stop() |
|
|
| Report Abuse |
|
|
|
| 03 Apr 2017 01:10 PM |
Oh ya I've had a similar question to this. Also how do you randomize it?
|
|
|
| Report Abuse |
|
|
|
| 03 Apr 2017 01:11 PM |
And make a gui button for it to turn on and off.
|
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 03 Apr 2017 01:11 PM |
If the ID changes the track may very well retain its previous length for a split second (this happened to me a year or two ago) If you run into errors with skipping and premature ending, try setting a variable outside of the loop equal to the last song's timelength, and repeat wait() until sound.TimeLength ~= oldTimeLength |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 03 Apr 2017 01:12 PM |
To randomize the song, just pick a random one out of the table by saying local songs {song1,song,2,song3,songEtc} local song = songs[math.random(1,#songs)] print(song) |
|
|
| Report Abuse |
|
|