Hazania
|
  |
| Joined: 04 Jun 2010 |
| Total Posts: 1344 |
|
|
| 11 Feb 2014 11:04 PM |
Most of script is just the variables, please read! For some reason when I click the play button, the radio starts at music, then music1, then music2, and then when it starts music3 it also starts music1 again!?!?!? Makes absolutely NO sense.... Please, if there is a dumb mistake or something please fix! Output says nothing.
--------------------------------------------------------------------------------
block=script.Parent.Parent click=script.Parent.ClickDetector musiclist={ script.Parent.Parent.music, script.Parent.Parent.music1, script.Parent.Parent.music2, script.Parent.Parent.music3, script.Parent.Parent.music4, script.Parent.Parent.music5, script.Parent.Parent.music6, script.Parent.Parent.music7, script.Parent.Parent.music8}
IsOn=false
function Off() IsOn=false for i=1, #musiclist do musiclist[i]:stop() end end
function On() IsOn=true if IsOn==true then for i=1, #musiclist do musiclist[i]:play() for i=1, 59 do if IsOn==false then Off() break else wait(1) end end end else end IsOn=false end
click.MouseClick:connect(function(OnClicked) if IsOn==false then On() else Off() end end) |
|
|
| Report Abuse |
|
|
Hazania
|
  |
| Joined: 04 Jun 2010 |
| Total Posts: 1344 |
|
|
| 11 Feb 2014 11:19 PM |
| Is everyone as clueless as I am? Bump. :3 |
|
|
| Report Abuse |
|
|
| |
|
Hazania
|
  |
| Joined: 04 Jun 2010 |
| Total Posts: 1344 |
|
|
| 11 Feb 2014 11:24 PM |
| well fudgeshipazzrapeagghh |
|
|
| Report Abuse |
|
|
robotmega
|
  |
| Joined: 16 May 2009 |
| Total Posts: 14084 |
|
|
| 11 Feb 2014 11:24 PM |
| its prob that loop inside a loop |
|
|
| Report Abuse |
|
|
robotmega
|
  |
| Joined: 16 May 2009 |
| Total Posts: 14084 |
|
|
| 11 Feb 2014 11:26 PM |
Most of script is just the variables, please read! For some reason when I click the play button, the radio starts at music, then music1, then music2, and then when it starts music3 it also starts music1 again!?!?!? Makes absolutely NO sense.... Please, if there is a dumb mistake or something please fix! Output says nothing.
--------------------------------------------------------------------------------
block=script.Parent.Parent click=script.Parent.ClickDetector musiclist={ script.Parent.Parent.music, script.Parent.Parent.music1, script.Parent.Parent.music2, script.Parent.Parent.music3, script.Parent.Parent.music4, script.Parent.Parent.music5, script.Parent.Parent.music6, script.Parent.Parent.music7, script.Parent.Parent.music8}
IsOn=false
function Off() IsOn=false for i=1, #musiclist do musiclist[i]:stop() end end
function On() IsOn=true if IsOn==true then for i=1, #musiclist do musiclist[i]:play() if IsOn==false then Off() break end end IsOn=false end
click.MouseClick:connect(function(OnClicked) if IsOn==false then On() else Off() end end) |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2014 11:28 PM |
| lol,i think he just fixed it.. |
|
|
| Report Abuse |
|
|
| |
|
Hazania
|
  |
| Joined: 04 Jun 2010 |
| Total Posts: 1344 |
|
|
| 11 Feb 2014 11:31 PM |
| There is nothing wrong with a loop in a loop, the outer loop knows to go through the music files in ascending order, but doesn't move on until the inner loop has completed it's cycle. Therefore it SHOULD play through to music8 and then end just find. But for whatever odd reason it randomly kicks the first music back up halfway through. |
|
|
| Report Abuse |
|
|
nosyliam
|
  |
| Joined: 29 Jan 2010 |
| Total Posts: 901 |
|
|
| 12 Feb 2014 12:25 AM |
:stop() isnt a property of a sound :Pause() is |
|
|
| Report Abuse |
|
|