In computing it is impossible to create random numbers, some ways are better than others but in roblox people would normally use math.random() because of its simplicity and that is what we will be covering today.
math.random() normally has two arguments within its brackets m and n. When both numbers are passed it will return a random number between the two numbers. For example math.random(17,36)
might return 22. If only m is passed then it will return a random number from 1,m. If nothing is passed it will return a number from 0,1.
To select a random item from an array you could do this:
num = math.random(1,#array) #array is used to tell you how many are in that array.
item = array[num] [ ] allows you to select an item in the list from where it's position is on a list.
This is a practical use of math.random().
You can use math.random() for many things as you can see a, random map chooser a random player chooser or you can use it to program random items which spawn in a game. This is one of the most useful things in programming and is very simple to use.