function roundModule.round(value, requiredPlayers)
round.Value = true
local playersInRound = {}
for _, player in ipairs(Players:GetPlayers()) do
if player and not table.find(playersInRound, player) then
table.insert(playersInRound, player)
ServerStorage[player.Name].InRound.Value = true
end
end
for i = value, 0, -1 do
gameStatus.Value = toSM(i)
for i, player in ipairs(playersInRound) do
if player then
local character = player.Character
if character then
else
table.remove(playersInRound, i)
end
if ServerStorage[player.Name].InRound.Value == false then
print(string.format("Player was removed from round table: %s", player.Name))
table.remove(playersInRound, i)
end
else
table.remove(playersInRound, i)
end
end
if #playersInRound < requiredPlayers then
print("BREAKING_MODULE")
break
end
if i == 0 then
gameStatus.Value = "Round ended"
wait(2)
break
end
wait(1)
end
end
return roundModule
Iām all ears.