• Random number script
    1 replies, posted
Hello, how I can get random number? For example I have numbers 2, 93, 105, 230 and I need get rundom of these numbers. Thank you.
Easiest way would be to put all the numbers in a table and then use table.Random to grab a random one. Here's a quick example: local myRandomNumbers = {2, 93, 105, 230}; function getARandomNumber() return table.Random(myRandomNumbers); end print(getARandomNumber());
Sorry, you need to Log In to post a reply to this thread.