This is my script: local musicFolder = game.Workspace.Music
local music = musicFolder:GetChildren()
local index = math.random(1, #music)
local function PlayNextSong()
if index > #music then
index = 1
end
music[index]:Play()
end
for _, song in ipairs(music) do
song.Ended:Connect(function()
index += 1
PlayNextSong()
end)
end
PlayNextSong()
None of my tracks are looped, yet for some reason the two of them play at the same time upon joining instead of one at a time. Please help!
** You are now Level 4! **