|
| 05 Sep 2014 05:13 PM |
| How would I play another audio after another one finishes? Can I even? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
Cheeso135
|
  |
| Joined: 13 Apr 2013 |
| Total Posts: 2016 |
|
|
| 05 Sep 2014 05:37 PM |
Yeah bud. Ok. SO say the first song is named song1 and is in workspace ok? I will make a script for a loop.
while true do workspace.song1:play() wait(10) ---------------Make this number be how long the song is in seconds (yes u have to count) workspace.song1:pause() workspace.song2:play() wait(10) --------------find the length again workspace.song2:pause() end |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2014 05:39 PM |
im not going to define things for you, if you dont know how, then give up whatever you're trying.
sound1:Play(); repeat wait() until sound1.IsPlaying == false; sound1:Pause(); sound2:Play(); |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2014 05:39 PM |
| Thx guys, the is playing will definitely help! <3 |
|
|
| Report Abuse |
|
|
Cheeso135
|
  |
| Joined: 13 Apr 2013 |
| Total Posts: 2016 |
|
|
| 05 Sep 2014 05:41 PM |
| np and mine is better ver \_/ |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2014 05:42 PM |
yours assumes the owner knows exactly how long the audio is. mine doesn't. |
|
|
| Report Abuse |
|
|
Cheeso135
|
  |
| Joined: 13 Apr 2013 |
| Total Posts: 2016 |
|
|
| 05 Sep 2014 05:46 PM |
true...but...doesnt take a genius to count seconds on a clock :D
Cheesecake |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2014 05:48 PM |
| go count 9.67 seconds for me and ill give you a cookie. |
|
|
| Report Abuse |
|
|
Cheeso135
|
  |
| Joined: 13 Apr 2013 |
| Total Posts: 2016 |
|
|
| 05 Sep 2014 05:53 PM |
| 1,2,3,4,5,6,7,8,9,9.67....DONE.lol |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2014 06:16 PM |
Wait, how will I make one of these audio play after one finishes?
a = math.random(1, 4) if (a == 1) then game.Workspace.Songs.Believer:Play() end
if (a == 2) then game.Workspace.Songs.Downwat:Play() end
if (a == 3) then game.Workspace.Songs.Happy:Play() end
if (a == 4) then game.Workspace.Songs.Snowman:Play() end
|
|
|
| Report Abuse |
|
|
Cheeso135
|
  |
| Joined: 13 Apr 2013 |
| Total Posts: 2016 |
|
|
| 05 Sep 2014 06:18 PM |
| hmmm. add a while true do I think. Also, the songs will not stop playing....as in you will have multiple songs playing at once. |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2014 06:21 PM |
| I have added a while true do once, but predicting the future, I did a save before I run it, because, of course, it crashed my studio... So that wont work :L |
|
|
| Report Abuse |
|
|
Cheeso135
|
  |
| Joined: 13 Apr 2013 |
| Total Posts: 2016 |
|
|
| 05 Sep 2014 06:26 PM |
| while true do i just a loop |
|
|
| Report Abuse |
|
|
lordrambo
|
  |
| Joined: 16 Jun 2009 |
| Total Posts: 20628 |
|
|
| 05 Sep 2014 06:34 PM |
It crashed because there is no type of waiting there.
In both examples people have made there were two types of waiting. You could either determine the length of the song (if you uploaded it or maybe it's a property of sound you would know) or the other guy's way would wait until the sound is no longer playing.
Which ever you choose to use place the wait inside all of these like so: if (a == 1) then game.Workspace.Songs.Believer:Play() --wait here end
Wrap the entire code (not just the spinet I posted here) with proper waiting added and put it in a while true do loop. It won't crash now. |
|
|
| Report Abuse |
|
|