Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do you pick one player out of all players?

i am not requesting anything, i already know quite a bit about getting players, but i need to know how i can go about picking one player to be a killer and the others to be survivors

1 answer

✓ Accepted answer

You can use :GetPlayers() which will give you a table containing all players, and then pick a random one with table[math.random(#table)].

[offtopic] Math.random is kinda broken, if you want it work well allways do this at the start of your scripts that use it:

math.randomseed(os.time());math.random();math.random();math.random();

2 comments

0

You only need to seed once per machine, not per script.

0

Right

This discussion is preserved as it was. New answers, comments, and votes are closed.