Question about rounds.

How would I go about creating a round system like this:

If all players are dead or all players on one team… the round ends. Once the round has ended their is a 5 second freeze after they have been respawned then the new round starts.

Obviously you’d need a timer and a hook for the deaths?

I’ll whip up some code from a gamemode of mine.

I assume this is for a gamemode? If so stick this in your init.lua

function GM:PlayerDeath()
if #self:GetAlives() == 1 then //Technically in this function the player is still alive so this means that the last player alive just died!
//Do some sort of timer to end the round and reset the players etc.

function GM:GetAlives()
local tab = {}
for k,v in pairs(player.GetAll()) do
if v:Alive() then
table.insert(tab, v)
return tab