I would love to have a music script that doesn't loop every time someone dies ingame, but have been pretty unsuccessful. Any suggestions?

--Script made by OpticUniversse in collaboration with Optic Studios


local sound = game.Workspace.Sound 
local soundTable = 
{316140510, 438917260, 467369212, 399781334, 425341748, 473452993, 491118865, 461736208}

while true do
    for i = 1, #soundTable do
        sound.SoundId = "rbxassetid://"..soundTable[i] 
        sound:Play() --hit play
        sound.Ended:wait()
        wait(1)
    end
end

1 comment

0

Could you explain a little more?