litalela
|
  |
| Joined: 30 Mar 2010 |
| Total Posts: 6267 |
|
|
| 23 Jul 2015 07:44 PM |
Song1 = script.Song1 Song2 = script.Song2 Song3 = script.Song3 Song4 = script.Song4 Song5 = script.Song5 Song6 = script.Song6 Song7 = script.Song7 Song8 = script.Song8 Song9 = script.Song9 Song10 = script.Song10 Song11 = script.Song11
songnumber = 1 script.songnumber.Value = 1 wait(1) songnumber = 1 script.songnumber.Value = 1
musicArray = {Song1, Song2, Song3, Song4, Song5, Song6, Song7, Song8, Song9, Song10, Song11, Song1}
function playSongs() if songnumber > 11 then songnumber = 1 script.songnumber.Value = 1 end musicArray[songnumber]:Play() print(musicArray[songnumber])
wait(musicArray[songnumber].TimeLength) musicArray[songnumber]:Stop() end
skip = script.skip
skip.Changed:connect(function() if skip.Value == true then musicArray[songnumber]:Stop() skip.Value = false songnumber = songnumber + 1 if songnumber > 11 then songnumber = 1 end game.Workspace.MusicQueue.songnumber.Value = songnumber playSongs() end end)
musicArray[songnumber].Stopped:connect(function() if musicArray[songnumber].IsPaused == true then songnumber = songnumber + 1 game.Workspace.MusicQueue.songnumber.Value = songnumber playSongs() end end)
playSongs()
However, it doesn't work when I join the game. I have to skip song and then the song plays, but it doesn't play the 1st song when I join. Skip works fine tho, ayy. |
|
|
| Report Abuse |
|
|
|
| 23 Jul 2015 07:59 PM |
| Do what i said to do b4 but make songnumber 0 by default if dat didn't work show what it says in the output |
|
|
| Report Abuse |
|
|
|
| 23 Jul 2015 08:00 PM |
| And remove play songs() from the very end of the script when u called it |
|
|
| Report Abuse |
|
|
litalela
|
  |
| Joined: 30 Mar 2010 |
| Total Posts: 6267 |
|
|
| 23 Jul 2015 08:19 PM |
If i make it 0 by default, another script breaks.
Also, the playsongs() at the end is just so that the song starts at the start |
|
|
| Report Abuse |
|
|
litalela
|
  |
| Joined: 30 Mar 2010 |
| Total Posts: 6267 |
|
| |
|
litalela
|
  |
| Joined: 30 Mar 2010 |
| Total Posts: 6267 |
|
| |
|
litalela
|
  |
| Joined: 30 Mar 2010 |
| Total Posts: 6267 |
|
| |
|
Vritix
|
  |
| Joined: 01 Jan 2011 |
| Total Posts: 2790 |
|
|
| 23 Jul 2015 08:41 PM |
| What are you trying to do with this script? |
|
|
| Report Abuse |
|
|
litalela
|
  |
| Joined: 30 Mar 2010 |
| Total Posts: 6267 |
|
|
| 23 Jul 2015 08:42 PM |
It's supposed to be a musicqueue where it plays the first song, then second etc.
However, there is a skip button which skips the song. The skip is fully functional, just that the 1st song doesnt start |
|
|
| Report Abuse |
|
|
litalela
|
  |
| Joined: 30 Mar 2010 |
| Total Posts: 6267 |
|
| |
|
|
| 23 Jul 2015 08:57 PM |
Maybe at the start just put
Song1:play() |
|
|
| Report Abuse |
|
|
litalela
|
  |
| Joined: 30 Mar 2010 |
| Total Posts: 6267 |
|
| |
|
| |
|