I want to make a player queue but im not sure where to start.

For example when i click a ticked box a player gets added to a table and then when there are enough players 2 players get picked from the table and teleported to a arena.

If you have an idea where to start please tell me.