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

2 comments
make it a function, k.Ended:connect(function() print("Ending Song...") k:Stop() end) or, while k.IsPlaying == true do wait() end
Why didn't you just do a wait function