Its topic entered the my mind and can I ask the questions? I not tried the that questions.
Firstly or last, How to number randomly select? Its same spin and that spin select the randomly number. I wants defined number to ID.
1
math.random(1,32)
math.random(1,32)
id = math.random(1, player(0, 'table'))
player(0,"table"). What you are doing ATM is getting a random value between 1 and... a table (which will error out). Also, there can be gaps in the player IDs, so whatever this RNG pulls, may not even exist in the server
local ptab, pid ptab = player(0,"table") pid = ptab[math.random(#ptab)]
id = player(0, 'table')[math.random(#player(0, 'table'))]
'table'to
'tableliving'if you only want living players.