I have a music system that plays different songs. Every single time the song ends and it takes some seconds for the next one. I use the wait function as so
wait(120)
I am wondering if there is a way to detect when a song ended. Thanks!
I have a music system that plays different songs. Every single time the song ends and it takes some seconds for the next one. I use the wait function as so
wait(120)
I am wondering if there is a way to detect when a song ended. Thanks!
Use the event sound.Ended.
sound.Ended:connect(function()
--Do something fancy
end)
Heres an event that may or may not work: song.Changed("Playing"), heres a line of code to check if its playing: if song.Playing then --returns true if the song is playing, false if it isn't, well yeah thats obvious
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Ended can only be used on the Client, or through Local Scripts. I would normally suggest making most sounds play via client or locally, but this might not be what he wants.