Playlist script issue

Hello, my name is Orange (an amateur scripter)…

And I wanted to create a very simple script that loops through the songs I have put in a part, playing each song and jumping to the next one, like a playlist.

For some reason, it only plays one song and doesn’t go to the next one in the quote. I would highly appreciate it if anyone could point out what I’ve done wrong.

The script:

Songs = script.Parent.Sound:GetChildren()

for i, song in ipairs(Songs) do
	
	song:Play()
	song.Stopped:Wait()
	
end

Nvm, I corrected it. Instead of utilizing the Stopped Event, I should have used the Ended Event.