How to get distinct random numbers?

Hello, I was wondering how I could get distinct random numbers from math.random() and put them in a list. I’ve been thinking about it and haven’t been able to come up with anything. What I mean is:

Running math.random(1,5) 3 times could result in something like: 1, 4, 4. I don’t want duplicate values, but I’m not sure how to do this. Could anyone help? Thanks!

Is this what you are looking for?

1 Like