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

How would I insert ONE playyer into a table?

Hi! I was wonder how I would insert ONE, just ONE, player into a table after he/she has been randomly picked (I already have that coding written.)

2 answers

✓ Accepted answer
table.insert(TABLENAME, PLAYER'SNAME]

5 comments

0

I mean, how would it insert the player into the table after he/she was randomly picked.

0

This is exactly what you want.

0

You changed it. :I

0

He couldn't have. It doesn't say "Edited x time ago"

0

That is not what it said earlier yesterday.

local player = math.random(1, game.Players.NumPlayers);
local playerList = {};
table.insert(playerList, game.Players[player]);

3 comments

0

This is helpful, but I just want to insert one player into a table, I already have a random player chooser script.

0

This... only inserts one player?

0

No, but you added the random player chooser, but I already got an answer, thanks though.

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