Scripting - Making a Music Queue

Hello! I’m having an error, not sure why. I can’t get the music to play, here is the errors:

I’m kind of a scripting noob so help is greatly appreciated! :slight_smile:

1 Like

I replied in your forum post. :slight_smile:

1 Like

Unfortunately, this is broken, even after the fixes. It stops working after 2 songs. This may have to be re-written.

1 Like

Are you sure? It works completely fine for me.

1 Like

Yeah, not sure why, really strange. Play my game, you’ll see the error after a bit.

It happens a lot quicker when I skip as well.

1 Like

Still doesn’t work, got any idea why? Seems really odd to me.

1 Like

I think the issue might be the skip script, It doesn’t happen unless I skip songs, then it stops working.

Edit: My bad, I think it’s because I put the skip part after the functions, sorry about that!

Edit2: Still is an issue. After you skip a song, and the song finishes, it stops playing a song. No errors in the console, not sure why this is happening.

1 Like

Please make a song request for this, I would love you forever!

2 Likes

Thanks for this excellent code. For a strange reason, it only plays the first song. It eventually loads the second song and also executes the Play() method, but you hear nothing. The URI is correct.
I did a quick hack, by creating and destroying the sound object for each song within the script. That seems to work :slight_smile:

1 Like

Thank you so much for this impressive tutorial! Definitely needed this since I’m a beginner programmer and I loved how you explained it in detail very well.

1 Like

Ah, beans. Maybe the reason all my games take forever to load is that I imported all the songs as Sound instances, instead of doing it like this…

1 Like