|
| 05 Jan 2015 09:19 PM |
| I have music in my game, but every time you die the music completely starts over. What do I do to fix that? |
|
|
| Report Abuse |
|
|
jashwa
|
  |
| Joined: 08 Feb 2010 |
| Total Posts: 378 |
|
| |
|
|
| 05 Jan 2015 09:21 PM |
| game.Workspace.Sound:Play() |
|
|
| Report Abuse |
|
|
| |
|
jashwa
|
  |
| Joined: 08 Feb 2010 |
| Total Posts: 378 |
|
|
| 05 Jan 2015 09:24 PM |
game.Workspace.Sound.Looped = true game.Workspace.Sound.IsPlaying = true
Try adding these? |
|
|
| Report Abuse |
|
|
|
| 05 Jan 2015 09:27 PM |
| Do I keep the game.Workspace.Sound:Play() or do I remove that? |
|
|
| Report Abuse |
|
|
jashwa
|
  |
| Joined: 08 Feb 2010 |
| Total Posts: 378 |
|
| |
|
| |
|
|
| 05 Jan 2015 09:32 PM |
| Also, it's a local script, if that helps. |
|
|
| Report Abuse |
|
|
jashwa
|
  |
| Joined: 08 Feb 2010 |
| Total Posts: 378 |
|
|
| 05 Jan 2015 09:35 PM |
Alternate:
kk = true --Change this to true if you want it to play music.
if kk == true then s = Instance.new("Sound")
s.Name = "Music" s.SoundId = "http://www.roblox.com/asset/?id=2303479" --SoundID here. s.Volume = 1 s.Looped = true s.Archivable = true
s.Parent = game.Workspace
while true do wait(.2) s:play()
wait(60)-- Time where music should stop and loop again. s:Pause() end end |
|
|
| Report Abuse |
|
|
|
| 05 Jan 2015 09:40 PM |
Well, the playing again stopped, but when you die the same song starts playing twice. Like you hear the song twice.
If you don't understand what I'm saying go to my game that says "test" and reset. You'll see what I'm talking about. |
|
|
| Report Abuse |
|
|
| |
|
jashwa
|
  |
| Joined: 08 Feb 2010 |
| Total Posts: 378 |
|
|
| 05 Jan 2015 09:46 PM |
| Did you remove your script. And REPLACE it with the one I provided? |
|
|
| Report Abuse |
|
|
| |
|
BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
|
| 05 Jan 2015 09:49 PM |
@jash his is local, and yours is server
@quack change it to a server script |
|
|
| Report Abuse |
|
|
|
| 05 Jan 2015 09:50 PM |
| I don't know what you mean by that. |
|
|
| Report Abuse |
|
|
jashwa
|
  |
| Joined: 08 Feb 2010 |
| Total Posts: 378 |
|
|
| 05 Jan 2015 09:50 PM |
| Oh yeah change it to server please. |
|
|
| Report Abuse |
|
|
jashwa
|
  |
| Joined: 08 Feb 2010 |
| Total Posts: 378 |
|
|
| 05 Jan 2015 09:51 PM |
Instead of having it in a local script.
Make a normal script.
Then put what I gave you in it. |
|
|
| Report Abuse |
|
|
BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
|
| 05 Jan 2015 09:53 PM |
^
If further help is needed PM me. |
|
|
| Report Abuse |
|
|
|
| 05 Jan 2015 09:57 PM |
| still have the same problem. |
|
|
| Report Abuse |
|
|
jashwa
|
  |
| Joined: 08 Feb 2010 |
| Total Posts: 378 |
|
| |
|
BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
|
| 05 Jan 2015 10:04 PM |
| jash your script is missing an end :P |
|
|
| Report Abuse |
|
|
BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
|
| 05 Jan 2015 10:06 PM |
There is one simple solution Move the following script into starter gui and delete all other music scripts
s = Instance.new("Sound") soundid=0--your soundid here
s.Name = "Music" s.Parent=script.Parent -- noting that this is in startergui. s.SoundId = "http://www.roblox.com/asset/?id="..soundid s.Volume = 1 s.Looped = true s.Archivable = true
while true do wait(.2) s:play() print("Sound "..soundid.." played") wait(60) repeat s:stop() wait() until s.IsPlaying==false end |
|
|
| Report Abuse |
|
|
BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
|
| 05 Jan 2015 10:07 PM |
the above can be server or local, preferably local if in startergui.
Please use local. |
|
|
| Report Abuse |
|
|
jashwa
|
  |
| Joined: 08 Feb 2010 |
| Total Posts: 378 |
|
| |
|