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: How do I get background music...in my game...?

Previous Thread :: Next Thread 
TREX0117 is not online. TREX0117
Joined: 08 Jun 2012
Total Posts: 150
13 Dec 2013 08:58 PM
Ok, so first of all, In my game I would like to have background music. Everytime I open it up in test mode OR play mode, the script won't work. I don't know if it's the asset or...whatever. Here is the link to the audio:

http://www.roblox.com/Jeff-Syndicate-Hip-Hop-item?id=27697735

When I turned it into it asset, it turned into this:

http://www.roblox.com/asset?id=27697734

I don't know if it is the content provider failing to process the ID or what... The script goes like this:

local s = Instance.new("Sound")

s.Name = "BGMusic"
s.SoundId = "SOUND ID"
s.Volume = 3
s.Looped = true
s.archivable = false
s.Pitch = 3

s.Parent = game.Workspace

wait(5)

s:play()

Someone PLEASE help me! Thanks!
Report Abuse
DrWaffler is not online. DrWaffler
Joined: 16 Sep 2011
Total Posts: 4248
13 Dec 2013 09:02 PM
Try setting the parent first, also try preloading the asset.

game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=27697734")

--[Territory Conquest Developer, Valerian Studios Developer, Business Casual Narwhal Moai. ]]--
Report Abuse
BEART12 is not online. BEART12
Joined: 22 Oct 2008
Total Posts: 3190
13 Dec 2013 09:07 PM
Wait music is back on roblox can u publish?
Report Abuse
DrWaffler is not online. DrWaffler
Joined: 16 Sep 2011
Total Posts: 4248
13 Dec 2013 09:10 PM
Yes Beart, it costs Robux to upload sounds. Currently there is a 15 second limit, but they're removing the cap soon, but cost will scale with time.

--[Territory Conquest Developer, Valerian Studios Developer, Business Casual Narwhal Moai. ]]--
Report Abuse
BEART12 is not online. BEART12
Joined: 22 Oct 2008
Total Posts: 3190
13 Dec 2013 09:18 PM
Wow... i remember when bc was not pushed on to you, nowdays its like a brick hitting your face!
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
13 Dec 2013 09:19 PM
It's not BC only, it just costs 250 robux to upload a sound.
Report Abuse
jode6543 is not online. jode6543
Joined: 16 Jun 2009
Total Posts: 5363
13 Dec 2013 09:42 PM
You don't need to subtract one from the asset id unless it is an image;
http://www.roblox.com/asset?id=27697735

~Jode
Report Abuse
TREX0117 is not online. TREX0117
Joined: 08 Jun 2012
Total Posts: 150
13 Dec 2013 11:37 PM
Ok thanks dude.
Report Abuse
TREX0117 is not online. TREX0117
Joined: 08 Jun 2012
Total Posts: 150
14 Dec 2013 12:51 PM
Well... nvm...it STILL won't work...
Report Abuse
TREX0117 is not online. TREX0117
Joined: 08 Jun 2012
Total Posts: 150
14 Dec 2013 10:47 PM
bump
Report Abuse
nighttimeninja314 is not online. nighttimeninja314
Joined: 04 Apr 2011
Total Posts: 4001
14 Dec 2013 10:48 PM
Volume cannot be higher than 1.
Report Abuse
DaMrNelson is not online. DaMrNelson
Joined: 27 Jul 2009
Total Posts: 4405
14 Dec 2013 10:49 PM
Sounds that are played before a Player joins will not be hearable by the Player who has just joined. Try putting the sound somewhere local (like game.Workspace.CurrentCamera) and playing it with a LocalScript.

Wiki Profile: http://wiki.roblox.com/index.php/User:Nelson
Report Abuse
Jetta765214 is not online. Jetta765214
Joined: 22 Oct 2008
Total Posts: 1855
14 Dec 2013 10:51 PM
The problem may be that the sound is tried to be played before it is loaded in the game. Try using a loop to repeatedly play the sound. Don't know how to check if the sound is playing to stop the loop, but this would tell you if this is the problem or not.
Report Abuse
DaMrNelson is not online. DaMrNelson
Joined: 27 Jul 2009
Total Posts: 4405
14 Dec 2013 10:51 PM
NINJA'D :D

Wiki Profile: http://wiki.roblox.com/index.php/User:Nelson
Report Abuse
TREX0117 is not online. TREX0117
Joined: 08 Jun 2012
Total Posts: 150
16 Dec 2013 06:10 PM
It is looped, it says that in the script.
Report Abuse
DaMrNelson is not online. DaMrNelson
Joined: 27 Jul 2009
Total Posts: 4405
16 Dec 2013 10:20 PM
Did you try my fix?

Dat phone siggy
Report Abuse
TREX0117 is not online. TREX0117
Joined: 08 Jun 2012
Total Posts: 150
17 Dec 2013 08:52 PM
No, not yet, I didn't really know what you meant. I know that you mean put it somewhere local, but I didn't know if you mean I had to right the script differently or...whatever...
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