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
|
  |
| 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
|
  |
| Joined: 26 Jan 2014 |
| Total Posts: 27 |
|
| |
|
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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 26 Jan 2014 |
| Total Posts: 27 |
|
|
| 03 Jul 2014 04:52 PM |
| Thanks you :D for your help :) it works :) |
|
|
| Report Abuse |
|
|