local Players = game.Players:GetPlayers()
game.Players[Players[math.random(1, #Players)]].TeamColor = BrickColor.new("Bronze")

The code above is giving this error: ServerScriptService.GameCore:37: bad argument #2 to 'random' (interval is empty)

1 comment

0

Your error message (interval is empty) is telling you the length of Players is 0, which means your code is running before any actual players have joined the game. You're also indexing Players twice, which means you're indexing players for a random player instead of a random index.