Hi there! I'm trying to create a game where one player is selected to kill the other players anonymously. How would you do this? I've created a script already but it hasn't worked.
function randomizer()
local players = game.Players:GetChildren()
local rPlayer = game.Players:GetPlayers()
[math.random(1, #players)]
wait(5)
rPlayer.TeamColor = BrickColor.new("Really red")
end
randomizer()
The error message reads
15:25:18.309 - ServerScriptService.Selecter:4: bad argument #2 to 'random' (interval is empty)
What does this mean? Is something wrong with the script?

3 comments
Thanks! Is there just a way to keep it from running all the time, like if someone is alreay on the "Really red" brickColor team?
That is entirely up to you, and should be implemented into the basis of your game. Before each round begins you'll need to loop through all the players and choose one randomly to be the murderer.
You should use the Random library instead of math.random, no need to seed and not biased.