.IsPlaying issue. Any way to fix?
I have ran into an issue with audio and I'm wondering if there is any way around it. I want it so that whenever a song is finished playing another song will begin playing. The problem is that after one song runs, about 90% of the time a second song will not play. I am not quite sure why but I believe that the problem lies with .IsPlaying
. I read that it doesn't work and even when it does it still isn't working too well. Is there any way to deal with the audio problem without having the script just wait for the length of the song that is playing?
01 | songs = { 142401311 , 163870179 , 149761849 } |
05 | workspace.Music:Pause() |
10 | if workspace.Music.IsPlaying = = false then |
11 | selection = math.random( 1 , #songs) |
13 | if selection = = 1 then |
14 | workspace.Music.Pitch = . 53 |
15 | elseif selection = = 2 then |
16 | workspace.Music.Pitch = . 75 |
17 | elseif selection = = 3 then |
18 | workspace.Music.Pitch = . 5 |
20 | workspace.Music:Play() |