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.
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.
You can add,subtract,multiply, and divide like so:
local RandomNum = math.random(1,101) - 1
Why not just do math.random(0,100) LOL
Do local RandomNum = math.random(0,100) instead.
that's what I just said xD
Where does the multiplication, addition, and division come in?
multiplication: local a = 1 local b = 2 local problem = a * b print(problem) Output: 2
division: local a = 2 local b = 10 local problem = b / a print(problem) Output: 5
addition: local a = 2 local b = 2 local problem = a + b print(problem) Output: 4
local RandomNum = math.random(0,100)
This discussion is preserved as it was. New answers, comments, and votes are closed.
3 comments
Self answered question?
idk, they said that hes new to coding.
math.random(0,100) works though.