|
| 27 Dec 2014 09:31 AM |
So I have this, and song1, and song2 are different assets for audio.
while (true) do local songs = {song1,song2} local song = math.random(1,#songs) print("Playing Sound"..song) script.Off.Value = false script.Song.Value = "Song"..song wait(0.1) music.SoundId = --[[How do I get the song variable here]] music:play() wait(120) music:stop() |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 27 Dec 2014 09:36 AM |
music.SoundId = "rbxasset://"..sound
Like that? Assuming the table elements are asset ids |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 27 Dec 2014 09:37 AM |
Eh I think I'm still half asleep what am I doing. I mean this:
music.SoundId = "rbxasset://"..songs[song] |
|
|
| Report Abuse |
|
|
| |
|
ChuckXZ
|
  |
| Joined: 26 Jan 2012 |
| Total Posts: 2996 |
|
|
| 27 Dec 2014 09:55 AM |
| You need to define the song's Id. |
|
|
| Report Abuse |
|
|