• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved How to randomize several different values?

Ahilphino

Excellent OT User
Joined
Jun 5, 2013
Messages
1,667
Solutions
1
Reaction score
734
Ok, so I would like to randomize 4 different values and I want all of them to be different values, right now I use this:
Code:
local a, b, c, d = math.random(1,10), math.random(1,10), math.random(1,10), math.random(1,10)
but with this system I would for instance sometimes get 2 or more of the same number, how can I make it so that they're always different numbers and all of them roll from 1 to 10?
 
As I said. It was just an example. Even if it was 20 or something, it's a lot of typing just to return the values. I'm just saying its best to return a table and access it later with a for loop rather than returning the individual values
yeah but alphino wanted individual values.
 
Back
Top