|
| 08 Dec 2014 05:47 PM |
| Ok, so I have 3 audios and I want one of the 3 audios to play randomly so that if the player respawns/dies they can hear one of them. |
|
|
| Report Abuse |
|
|
|
| 08 Dec 2014 05:54 PM |
function DeadlySound() local math = math.random(3) if (math==1) then audio1:Play() end if (math==2) then audio1:Play() end if (math==3) then audio1:Play() end end -- trigger goes here |
|
|
| Report Abuse |
|
|
|
| 08 Dec 2014 05:55 PM |
| math.random() takes 0 or 2 arguments. |
|
|
| Report Abuse |
|
|
|
| 08 Dec 2014 05:57 PM |
New.BackgroundColor3 = Color3.new(math.random(255)/255,math.random(255)/255,math.random(255)/255)
works flawlessly for me, I believe it assumes its 1,# if only 1 argument is present. |
|
|
| Report Abuse |
|
|
|
| 08 Dec 2014 05:59 PM |
oh yeah, forgot about that
|
|
|
| Report Abuse |
|
|
|
| 08 Dec 2014 06:21 PM |
@CT
That makes all of them play at one same time |
|
|
| Report Abuse |
|
|
| |
|