RealistK
|
  |
| Joined: 20 Feb 2011 |
| Total Posts: 3489 |
|
|
| 03 Jan 2014 04:54 AM |
It's in workspace. Name: Sound Pitch: 1 SoundID: http://www.roblox.com/asset/?id=5982975 Volume: 0.5 Archivable: Yes Looped: Yes
And I also putted a script in it: script.Parent:Play()
It works perfect in play solo modus, but when I upload it to the game it doesn't work. |
|
|
| Report Abuse |
|
|
|
| 03 Jan 2014 04:57 AM |
Sounds need time to load before they are played. Use preload method to load the sound.
http://wiki.roblox.com/index.php/Preload_(Method) |
|
|
| Report Abuse |
|
|
RealistK
|
  |
| Joined: 20 Feb 2011 |
| Total Posts: 3489 |
|
|
| 03 Jan 2014 05:05 AM |
for _, asset in ipairs(Assets) do Game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=5982975" .. asset) end
script.Parent:Play()
So this will be the script? |
|
|
| Report Abuse |
|
|
RealistK
|
  |
| Joined: 20 Feb 2011 |
| Total Posts: 3489 |
|
| |
|
|
| 03 Jan 2014 05:30 AM |
Yes.
Keyboard not found. Press F1 to continue. |
|
|
| Report Abuse |
|
|
RealistK
|
  |
| Joined: 20 Feb 2011 |
| Total Posts: 3489 |
|
|
| 03 Jan 2014 06:20 AM |
| It still does not work with the script I posted. |
|
|
| Report Abuse |
|
|
|
| 03 Jan 2014 06:32 AM |
Separate script, the one in the sound should not be changed. Then make a LocalScript either in StarterPack or StarterGui, put this in:
Game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=5982975") |
|
|
| Report Abuse |
|
|
RealistK
|
  |
| Joined: 20 Feb 2011 |
| Total Posts: 3489 |
|
|
| 03 Jan 2014 06:49 AM |
| Do you mean the script I posted first or the one I posted after? With the preload? |
|
|
| Report Abuse |
|
|
oxcool1
|
  |
| Joined: 05 Nov 2009 |
| Total Posts: 15444 |
|
|
| 03 Jan 2014 06:50 AM |
Preload doesn't wait until the asset loaded.
I suggested for a mod to add WaitForPreload or something similar.
For now, just wait sometime (like 5 sec) before playing the sound. |
|
|
| Report Abuse |
|
|
RealistK
|
  |
| Joined: 20 Feb 2011 |
| Total Posts: 3489 |
|
| |
|
oxcool1
|
  |
| Joined: 05 Nov 2009 |
| Total Posts: 15444 |
|
|
| 03 Jan 2014 06:57 AM |
Try:
wait(5) script.Parent:Play() |
|
|
| Report Abuse |
|
|
RealistK
|
  |
| Joined: 20 Feb 2011 |
| Total Posts: 3489 |
|
|
| 03 Jan 2014 07:12 AM |
| Ah okay thanks will try soon |
|
|
| Report Abuse |
|
|
RealistK
|
  |
| Joined: 20 Feb 2011 |
| Total Posts: 3489 |
|
| |
|
oxcool1
|
  |
| Joined: 05 Nov 2009 |
| Total Posts: 15444 |
|
|
| 03 Jan 2014 07:41 AM |
try wait(60)
if it didn't work, then the problem is not about whether the sound loaded or not. |
|
|
| Report Abuse |
|
|
RealistK
|
  |
| Joined: 20 Feb 2011 |
| Total Posts: 3489 |
|
| |
|