I have a table but I don't understand how to pick a random number from it, How?
local Table = {143737549, 142312040, } local Table
local Table = {143737549, 142312040, }
Theres your example... without the local Table at the end (not needed)
print(Table[math.random(1,#Table)]) -- Prints a random value in A table
if you want to do stuff with use can use varirables
x = Table[math.random(1,#Table)] script.Parent.Text = x
local Table = {143737549, 142312040, } local a = math.random(1,#Table) -- This will select 1 number in table.
Table = {ur stuff in here} pickedthings = math.random(1, #Table) print(pickedthings)
Try this
local Table= (123456789,104050) math.Random.Table (123456789,104050) --do stuff print ("..number...")
I am a noob at scripting so i don't know if this will work or not.