|
| 16 Oct 2015 10:30 AM |
Everything is fine the it plays the music perfectly until I die it plays 2 songs at a time... I own a 2d speed run so lots of people are going to die. So please help.
gw=game.Workspace last="" lastlast="" while true do wait(1) local tracks=script:GetChildren() local rn=math.random(1,#tracks) local track=tracks[rn] if track~=nil then if track.className=="Sound" and track.Name~=last and track.Name~=lastlast then lastlast=last last=track.Name track:play() wait(80) end end end
Sorry. You can only view this signature if you have a ROBLOX™ Builders Club. |
|
|
| Report Abuse |
|
|
|
| 16 Oct 2015 10:33 AM |
is it in localscript?
you could do a for loop and :Stop() them all on respawn |
|
|
| Report Abuse |
|
|
|
| 16 Oct 2015 10:34 AM |
Yes
Sorry. You can only view this signature if you have a ROBLOX™ Builders Club. |
|
|
| Report Abuse |
|
|
|
| 16 Oct 2015 10:34 AM |
Oh never mind no
Sorry. You can only view this signature if you have a ROBLOX™ Builders Club. |
|
|
| Report Abuse |
|
|
|
| 16 Oct 2015 10:36 AM |
I've been messing with this script for a while just not able to fix it.
Sorry. You can only view this signature if you have a ROBLOX™ Builders Club. |
|
|
| Report Abuse |
|
|
|
| 16 Oct 2015 10:37 AM |
| "you could do a for loop and :Stop() them all on respawn" |
|
|
| Report Abuse |
|
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
| |
|
|
| 16 Oct 2015 10:39 AM |
Mighty I'm sorry I'm new at scripting I don't know exactly how to add that in.
Sorry. You can only view this signature if you have a ROBLOX™ Builders Club. |
|
|
| Report Abuse |
|
|
|
| 16 Oct 2015 10:40 AM |
Without errors anyway.
Sorry. You can only view this signature if you have a ROBLOX™ Builders Club. |
|
|
| Report Abuse |
|
|
|
| 16 Oct 2015 10:43 AM |
You think you could help me out?
Sorry. You can only view this signature if you have ROBLOX™ Builders Club. |
|
|
| Report Abuse |
|
|
|
| 16 Oct 2015 10:44 AM |
| Yes I can. Let me write it real quick |
|
|
| Report Abuse |
|
|
|
| 16 Oct 2015 10:45 AM |
Thank you so much!
Sorry. You can only view this signature if you have ROBLOX™ Builders Club. |
|
|
| Report Abuse |
|
|
|
| 16 Oct 2015 10:46 AM |
Solution 1: gw=game.Workspace last="" lastlast="" for i,v in next,script:getChildren() do if v.ClassName == "Sound" then v:Stop() end end while true do wait(1) local tracks=script:GetChildren() local rn=math.random(1,#tracks) local track=tracks[rn] if track~=nil then if track.className=="Sound" and track.Name~=last and track.Name~=lastlast then lastlast=last last=track.Name track:play() wait(80) end end end
Solution 2: StarterGui.ResetPlayerGuiOnSpawn = false |
|
|
| Report Abuse |
|
|
|
| 16 Oct 2015 10:48 AM |
Thanks so much!
Sorry. You can only view this signature if you have ROBLOX™ Builders Club. |
|
|
| Report Abuse |
|
|
|
| 16 Oct 2015 10:52 AM |
Hmm for some reason it did not work. It worked for a couple of deaths then failed.
Sorry. You can only view this signature if you have ROBLOX™ Builders Club. |
|
|
| Report Abuse |
|
|
|
| 16 Oct 2015 11:02 AM |
| try solution 2. it should be working i dont know how you bumped it up |
|
|
| Report Abuse |
|
|