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 get a value from table?

Hello, I am making a code generator and I'm to getting a value from a table but I can't find a function that will do it.

Here is the code



alphabet = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "I", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}

-- VARIABLES --
local codesize = 7 -- how long do you want the code to be.
local Code = "" -- leave this empty.

-- CODE --
for i = 1, codesize, 1 do
	local letterpicker = math.random(0, 25)
	local letter = table:
end

1 answer

✓ Accepted answer

You can do this as simply as:

local letter = alphabet[math.random(#alphabet)]

1 comment

0

ok

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