So I'm making a game where there are "rounds" where all the players fight, and in this script I'm trying to make a table of all the active players, and then if a player dies, they are removed from the table. For some reason, this part of the script just seems to be skipped, and I don't know why. Please help!
local localtimer = roundtime activecontestants = {contestants} while localtimer > 1 do wait(1) localtimer = localtimer - 1 status.Value = localtimer for _, player in pairs(activecontestants) do if player.Health == 0 then table.remove(activecontestants, player) end end if #activecontestants == 1 or localtimer <= 1 then break end end