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 play music in the background

Previous Thread :: Next Thread 
GoAndPlay is not online. GoAndPlay
Joined: 26 Jan 2014
Total Posts: 27
03 Jul 2014 04:22 PM
How do i play music in the background, I don't know how to script sorry could anyone help me. im making a new game but I need audio in the background I don't know how to do it
please help
thank you
Report Abuse
samy22 is not online. samy22
Joined: 28 Sep 2008
Total Posts: 2181
03 Jul 2014 04:27 PM
Id = "11998796" --from the url of the audio, the last few numbers is the ID, replace these numbers with that new ID


sound = Instance.new("Sound", Workspace)
sound.Volume = 1
sound.Pitch = 1
sound.SoundId = "http://www.roblox.com/asset/?id=" ..Id
sound.Looped = true --if you want it to loop.
sound:Play()
Report Abuse
GoAndPlay is not online. GoAndPlay
Joined: 26 Jan 2014
Total Posts: 27
03 Jul 2014 04:42 PM
thank you :)
Report Abuse
GoAndPlay is not online. GoAndPlay
Joined: 26 Jan 2014
Total Posts: 27
03 Jul 2014 04:46 PM
sound.SoundId = "http://www.roblox.com/asset/?id=" ..Id

I put id in and it goes red not sure what that means
Report Abuse
samy22 is not online. samy22
Joined: 28 Sep 2008
Total Posts: 2181
03 Jul 2014 04:48 PM
no ! not that line...



Id = "PUT ID HERE"


e.g.


Id = "2342423"
Report Abuse
GoAndPlay is not online. GoAndPlay
Joined: 26 Jan 2014
Total Posts: 27
03 Jul 2014 04:50 PM
like this

sound = Instance.new("Sound", Workspace)
sound.Volume = 1
sound.Pitch = 1
sound.SoundId = "http://www.roblox.com/asset/?id=130844430" ..Id
sound.Looped = true --if you want it to loop.
sound:Play()
Report Abuse
samy22 is not online. samy22
Joined: 28 Sep 2008
Total Posts: 2181
03 Jul 2014 04:51 PM
--sigh, r u serious.. ok here's the fix,





sound = Instance.new("Sound", Workspace)
sound.Volume = 1
sound.Pitch = 1
sound.SoundId = "http://www.roblox.com/asset/?id=130844430"
sound.Looped = true --if you want it to loop.
sound:Play()
Report Abuse
GoAndPlay is not online. GoAndPlay
Joined: 26 Jan 2014
Total Posts: 27
03 Jul 2014 04:52 PM
Thanks you :D for your help :) it works :)
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