The song plays and everything it just doesn't get the .Ended part, It doesn't print 'ending song'
y god, y.
for _,k in next,t do print('editing values') val = val + 1 scrollframe.Parent.CurrentAudioNumber.Text = "Playing "..val.." out of "..maxnum.. " audios" print('playing song') k:Play() k.Ended:wait() print('ending song') k:Stop() end
The event Ended
only works for LocalScripts, because sounds on ROBLOX are downloaded directly to the client, so are started at different times for each users. Therefore it's impossible for the server to anticipate when the song has ended.
Solution
Well, there technically is no direct solution to this problem. Either you directly input the length of every song manually, or you play all audios locally or you do a mixture of both.
I have had multiple conversations with JParty (ROBLOX Developer Relations) about this problem, and have suggested they do add some sort of SongLength to the Server side of the code.