Math.random help

Hello, is it possible to make a condition if the value of math random is between 1 and 10 for exemple?

Exemple:

local number = math.random(1,100)

if number == (1,10) then

if number == (10,30) then

it’s not possible to do that? i don’t want to make:

if number == 1 then
if number == 2 then

it’s so long…

The statements would look like this:

if number >= 1 and number <= 10 then

Although you’re using math.random with 1 as minimum…

if number <= 10 then

You could do something like

local number = math.random(1,100)

If number >= 1 and <= 9 then

elseif number >= 10 and <= 30

end