|
| 15 May 2015 07:44 PM |
I am having trouble in my script. The game plays music and then stops it after a repeat loop. However, the music doesn't stop playing and just overlaps with the music that plays afterwards. How can I prevent this? Here is the code:
local sounds = game.Workspace.RoundMusic:GetChildren() local sound = sounds[math.random(1,#sounds)] local soundd = sound:Clone() soundd.Parent = game.Workspace soundd:Play() local sum = 0 local num = 0 local tiem = 120 --[[120]] repeat sum = 0 for p,d in pairs (game.Players:GetChildren()) do coroutine.resume(coroutine.create(function() d.PlayerGui.TopBar.Frame.TextLabel.Text = "There are "..tiem.." seconds left to tag the runners!" end)) if d.RoleVal.Value == 1 then sum = sum + 1 end if d.RoleVal.Value == 2 then num = num + 1 end end tiem = tiem - 1 wait(1) until tiem == 0 or sum == 0 or num == 0 soundd:Stop() soundd:Destroy() wait(1) local soundss = game.Workspace.Sounds:GetChildren() local soundw = soundss[math.random(1,#soundss)] local sounddd = soundw:Clone() sounddd.Parent = game.Workspace sounddd:Play() sounddd:Destroy() |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
| 15 May 2015 08:32 PM |
| Theres one in my models i made today. |
|
|
| Report Abuse |
|
|
|
| 15 May 2015 08:51 PM |
that has nothing to do with anything
b7 |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 15 May 2015 09:15 PM |
| My script works and i gave you it. just use mine and edit it newb |
|
|
| Report Abuse |
|
|
|
| 15 May 2015 09:21 PM |
Maybe make it onsale before you call me a newb, mk?
b11 |
|
|
| Report Abuse |
|
|
|
| 15 May 2015 09:27 PM |
| sorry, i forgot. mk? its forsale now. |
|
|
| Report Abuse |
|
|
drager980
|
  |
| Joined: 25 May 2009 |
| Total Posts: 13385 |
|
|
| 15 May 2015 09:28 PM |
nice manners guys, almost as bad as mine
AND THE TIGER GOES ROAR |
|
|
| Report Abuse |
|
|