I have the array "array1 = {1, 2, 3}", and I'd like to pull a random variable from the table. math.random seems to give me the same sequence of numbers, constantly, rather than being random. Any idea how to make it truly random?
✓ ANSWER ACCEPTED
How Would You Pull a Random Variable from an Array?
1 answer
✓ Accepted answer
array1[math.random(1, #array1)]
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
Gives me 1 every time.
It works. Keep testin' it.
Mm. Must've been giving me 1 every time by random chance, tried it again and it works.