So I use math.random to pick out one player from the entire server to be chosen as a monster. Simple, right? However, the problem is that sometimes that same player gets picked again. He can be picked up to 10 times in a row before the picker chooses another person, which is a huge problem. How can I go about making a truly random picker, and make sure that the person who was just picked cannot be chosen again until at least 2 rounds later?
My current script (functional, but problem is stated above):
-- this function is fired every time a new round starts.
function chooseBeast()
local plrs = game.Players:GetPlayers()
local eligibleplrs = {}
for _,v in pairs(plrs) do
if v:FindFirstChild("AFK") and v.AFK.Value == false then
table.insert(eligibleplrs, v)
end
end
local randteam = eligibleplrs[math.random(1, #eligibleplrs)] --<- choose monster HERE --
end
-- this is a simplified version of my script btw, above this comment is where my problem arises.
while wait(120) do
resetEverything()
-- intermission
wait(30)
chooseBeast()
LoadMap(math.random(1, 10)
end

3 comments
I have this problem too. It is just Roblox, you can't rly fix it...
That will happen, you just need more players in your game.
I had around 5 players at one time with the same problem, idk what to do honestly. I've seen other successful games that seem to have solved this problem.