So, this is less asking for help but more just comprehending how Lua works. So, if you haven't seen the tutorial already, when developing the system that checks for how many players currently in the round, the script iterates through all current players like this:
local localtimer = roundtime
while localtimer > 0 do
wait(1)
localtimer = localtimer - 1
timertag.Value = localtimer
activecontestants = {}
bloxxeractive = false
for _, player in pairs(contestants) do
if player then
local character = player.Character
if character then
local matchtag = character:FindFirstChild("MatchTag")
local humanoid = character:FindFirstChild("Humanoid")
if matchtag and humanoid and humanoid.Health > 0 then
if player == bloxxer then
bloxxeractive = true
end
table.insert(activecontestants, player)
end
end
end
end
if #activecontestants <= 1 or not bloxxeractive then
break
end
end
However, there doesn't seem to be a point where anyone is removed from the table, even after the round. How does the script then properly check the amount of players playing?
