I'm making a round system for a game and I made a game length variable to indicate when the time is up but right when it starts the game runs it even though there are 43 seconds left, Can anyone help me?
local gameLength = 43
for i = gameLength,0,-1 do
for x, player in pairs(playersAlive) do
if player then
character = player.Character
if not character then
-- Left the game
else
if character:FindFirstChild("GameTag") then
-- They are still alive
else
-- They are dead
table.remove(playersAlive,x)
print(player.Name.." Has been removed!")
end
end
else
table.remove(playersAlive,x)
print(player.Name.." Has been removed!")
end
end
if i == 0 then
status.Value = "Times up!"
wait(2)
break
end

4 comments
Error message ?
nope
I am pretty sure you need to define player, player by its self is not a valid statement.
I dont know if this is the problem but you never added the end for the "for i = gameLength,0,-1 do" statement