BruceAB12
|
  |
| Joined: 19 Jan 2012 |
| Total Posts: 3238 |
|
|
| 19 Nov 2013 07:48 PM |
Assets = {130768080,130762736,130762870,131243684,130773779,131293487,131389245,132251996,131055106,131509782,130788529,131321256,131320359,131394800,135646205} for _, asset in ipairs(Assets) do Game:GetService("ContentProvider"):Preload("http://roblox.com/asset/?id="..asset) end
Tool.Handle.Song.SoundId = ("http://www.roblox.com/asset/?id="..Assets[math.random(#Assets)]) Tool.Handle.Song:Play()
Why doesn't this work, not output it just doesn't play the sound.
|
|
|
| Report Abuse |
|
|
BruceAB12
|
  |
| Joined: 19 Jan 2012 |
| Total Posts: 3238 |
|
| |
|
BruceAB12
|
  |
| Joined: 19 Jan 2012 |
| Total Posts: 3238 |
|
| |
|
|
| 21 Nov 2013 06:53 PM |
| try adding a wait() between assigning the sound ID, and playing it. |
|
|
| Report Abuse |
|
|
Madified
|
  |
| Joined: 19 Apr 2011 |
| Total Posts: 5292 |
|
| |
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 21 Nov 2013 07:10 PM |
| Madified, instead of wasting a post insulting someone who tries to help, how about you actually explain what's wrong with the script. |
|
|
| Report Abuse |
|
|
coplox
|
  |
| Joined: 07 Jun 2008 |
| Total Posts: 3252 |
|
|
| 21 Nov 2013 07:12 PM |
| The "math.random(#Assets)" should be "math.random(1, #Assets)" |
|
|
| Report Abuse |
|
|
BruceAB12
|
  |
| Joined: 19 Jan 2012 |
| Total Posts: 3238 |
|
| |
|
Bebee2
|
  |
| Joined: 17 May 2009 |
| Total Posts: 3985 |
|
|
| 21 Nov 2013 07:37 PM |
Stop the sound then play it then stop it then play it again is my suggestion. Sometimes it only loads while activating it.
|
|
|
| Report Abuse |
|
|
BruceAB12
|
  |
| Joined: 19 Jan 2012 |
| Total Posts: 3238 |
|
| |
|
BruceAB12
|
  |
| Joined: 19 Jan 2012 |
| Total Posts: 3238 |
|
|
| 21 Nov 2013 07:54 PM |
| The script works but the sound doesn't play. |
|
|
| Report Abuse |
|
|
BruceAB12
|
  |
| Joined: 19 Jan 2012 |
| Total Posts: 3238 |
|
|
| 21 Nov 2013 08:04 PM |
| A wait(1) seem to do the trick. |
|
|
| Report Abuse |
|
|