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

how do I randomize between 0-100?

local RandomNum = math.random(1,100)

I for some reason cant use 0-100 so I can Only do this. Also im heavily new to coding.

3 comments

2

Self answered question?

0

idk, they said that hes new to coding.

2

math.random(0,100) works though.

2 answers

✓ Accepted answer

You can add,subtract,multiply, and divide like so:

local RandomNum = math.random(1,101) - 1

7 comments

0

Why not just do math.random(0,100) LOL

1

Do local RandomNum = math.random(0,100) instead.

0

that's what I just said xD

0

Where does the multiplication, addition, and division come in?

0

multiplication: local a = 1 local b = 2 local problem = a * b print(problem) Output: 2

0

division: local a = 2 local b = 10 local problem = b / a print(problem) Output: 5

0

addition: local a = 2 local b = 2 local problem = a + b print(problem) Output: 4

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