I want to insert two random players into a table, and check if they are in the table before they are put in, so that noone is put in the table twice. I have tried making this script, but I have no idea if it works.
if #contestants == 8 or #contestants == 9 or #contestants == 10 then
for _, randomplayers in pairs(2 * math.random(1, #contestants)) do
if randomplayers and randomplayers.Health > 0 then
table.insert(robber, randomplayers)
end
end
Thanks!

2 comments
In your for loop you are trying to loop through a number?
It is supposed to pick a contestant. I figured out that the loopo above wasn't going to work.