Math.random only gives 1

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I would like to randomize a number between 1 and 2. Like a dice that only has 2 numbers on it, aka 1 and 2.

  2. What is the issue? Include screenshots / videos if possible!
    It only gives 1 as random, and never 2.

local Number = math.random(1,2)
  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    i’ve tried searching around, found nothing
1 Like

If you don’t do anything else with the random number, then it seems that you were very lucky and got only 1s.

Edit: Try it a few more times, it should start generating 2s in a while.

1 Like

Try increasing from 1,2 to 1,6.

1 Like

how unlucky for me then, it gives 2 too now, thanks

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.