✓ Accepted answer
Make an alive variable inside the players, and create a separate script to handle switching it off when their Humanoid.Died
Then create a table, like alive = {}
alive = {}
for i,v in pairs(game.Players:GetPlayers()) do
if v:FindFirstChild("Alive") then
v.Alive.Value = true
table.insert(alive, v.Name)
end
end
for time = 1,120 do
wait(1)
if #alive <= 1 then
break
end
for i,v in pairs(game.Players:GetPlayers()) do
if not v.Alive.Value then
table.remove(alive, i)
end
end
end
This is just an example of how I do it.
1 comment
By Died event you mean CharacterRemoving.So every time a Player is dead remove their name from the table until you have one player name in the table.