|
| 12 Oct 2013 11:31 AM |
I was reading the blog and I want to make my game have music (a sound put on repeat)
I inserted the sound and then the ID of the sound i wanted to play and then i inserted a local script saying
game.Workspace.Sound:Play()
i then checked off the box looped under the properties of sound
the "song" doesn't play when i go into testing mode. whats wrong?
am i suppose to put the local script into the sound or just leave it alone in workspace? |
|
|
| Report Abuse |
|
|
BogyMac
|
  |
| Joined: 04 Nov 2011 |
| Total Posts: 823 |
|
|
| 12 Oct 2013 11:32 AM |
| Is there only one sound in Workspace? |
|
|
| Report Abuse |
|
|
Excellus
|
  |
| Joined: 17 Jun 2013 |
| Total Posts: 3939 |
|
|
| 12 Oct 2013 11:32 AM |
| It shouldn't play, if you unchecked the loop box and only play it once, it won't play on test. |
|
|
| Report Abuse |
|
|
|
| 12 Oct 2013 11:34 AM |
@BOGY
yes
@excell
no i mean i checked off the loop box so i put the sound on looped. |
|
|
| Report Abuse |
|
|
|
| 12 Oct 2013 11:34 AM |
should i do this?
while true do game.Workspace.Sound:Play() end |
|
|
| Report Abuse |
|
|
Excellus
|
  |
| Joined: 17 Jun 2013 |
| Total Posts: 3939 |
|
|
| 12 Oct 2013 11:35 AM |
| If you want to crash your game. |
|
|
| Report Abuse |
|
|
| |
|
Excellus
|
  |
| Joined: 17 Jun 2013 |
| Total Posts: 3939 |
|
|
| 12 Oct 2013 11:37 AM |
| Usually infinite loops with no wait should crash the game. |
|
|
| Report Abuse |
|
|
|
| 12 Oct 2013 11:41 AM |
| i need help anyways. how can i make the sound play? |
|
|
| Report Abuse |
|
|
Excellus
|
  |
| Joined: 17 Jun 2013 |
| Total Posts: 3939 |
|
|
| 12 Oct 2013 11:43 AM |
function play() if game.Players.NumPlayers > 1 then return end if game.Players.NumPlayers = 1 then game.Workspace.Sound:Play() end end end game.Players.PlayerAdded:connect(play) |
|
|
| Report Abuse |
|
|
| |
|
| |
|