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

Why is this randomized number generator only outputting 2?

1 answer

✓ Accepted answer

To program a random number from 1 to 3, first we must set a variable to this number. Let's call this variable RandomNumber.

This is all you have to do.

RandomNumber = math.random(1,3)

If you want it to choose a number from let's say, 3 to 7, then you would declare:

RandomNumber = math.random(3,7)

1 comment

0

This will set RandomNumber to a random value from 1 to 3. (Or at least the first line will)

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