Im Trying to get a certain number:10
Im also using a Table with numbers in it.
Im Using Math.Random to have a random possibility to print a range of numbers in the table.
Hers the code but i want it to keep Using Math.Random until the Number 10 Gets Selected:
local Nums = {1,2,3,4,5,6,7,8,9,10}
local ChosenNum = Nums[math.random(1,#Nums)]
repeat Print(ChosenNum) until ChosenNum == 10
Code inside the loop runs more than once. Code outside of the loop runs once. If you call math.random inside the loop then each time it is called, it will return another random number.