generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Sounds plays in solo mode but not in the game itself

Previous Thread :: Next Thread 
RealistK is not online. 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
Vaporation is not online. Vaporation
Joined: 08 Jun 2011
Total Posts: 1397
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 is not online. 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 is not online. RealistK
Joined: 20 Feb 2011
Total Posts: 3489
03 Jan 2014 05:23 AM
1
Report Abuse
Basswobble is not online. Basswobble
Joined: 18 Jul 2011
Total Posts: 3249
03 Jan 2014 05:30 AM
Yes.

Keyboard not found. Press F1 to continue.
Report Abuse
RealistK is not online. 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
Vaporation is not online. Vaporation
Joined: 08 Jun 2011
Total Posts: 1397
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 is not online. 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 is not online. 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 is not online. RealistK
Joined: 20 Feb 2011
Total Posts: 3489
03 Jan 2014 06:50 AM
?
Report Abuse
oxcool1 is not online. oxcool1
Joined: 05 Nov 2009
Total Posts: 15444
03 Jan 2014 06:57 AM
Try:

wait(5)
script.Parent:Play()
Report Abuse
RealistK is not online. RealistK
Joined: 20 Feb 2011
Total Posts: 3489
03 Jan 2014 07:12 AM
Ah okay thanks will try soon
Report Abuse
RealistK is not online. RealistK
Joined: 20 Feb 2011
Total Posts: 3489
03 Jan 2014 07:38 AM
Still does not work.
Report Abuse
oxcool1 is not online. 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 is not online. RealistK
Joined: 20 Feb 2011
Total Posts: 3489
03 Jan 2014 07:49 AM
Yay it worked <3 thanks
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image