So I was making a script to choose a random player, but it wasn't working.
while wait(120) do if game.Players:GetChildren() > 1 then local randomPlayer = game.Players:GetPlayers() [math.random(2, #game.Players:GetPlayers())] print(randomPlayer.Name) end end
Almost there!, Try this:
while wait(10) do if #game.Players:GetChildren() > 1 then local Players = game.Players:GetPlayers() randomPlayer = Players [math.random(1, #Players )] print(randomPlayer.Name) end end