Whenever I do y = math.random(5,15) and then for _ = 5,y do it chooses a number that I am not allowing it too.

6 comments

0

What number would that be?

0

math.random() never returns anything outside the given range, so I have no idea what you're talking about.

0

For some reason it is for me

0

Print to debug. It is giving you a number between 5 and 15, both inclusive. Your issue is caused by something else.

0

o m g u s e c o d e b l o c k s

0

The issue is probably you are starting your numeric for at 5, and the number generated was also 5. It looks like, if your start is the same number as your goal, the codes are not executing.