Hey there! I totally forgot how math.random worked.
Could anyone explain this to me?
I need it for a FOV changer that just changed the fov at random moments.
A math.random(min,max) is a CODE for getting a random number.
This CODE means to print a number that 1 to 10. Let's do another code :
OH, WHAT'S WRONG? Aha, ignore the " " in the print!
local number1 = math.random(1,10) print("OMG, THE NUMBER IS ".. number1)
OMG, THE NUMBER IS 4
Ok, thanks for watching, have a nice day and happy coding :) If you have any question comment below :D
math.random() gets a random number when specified. It's inclusive. example:
local r=math.random(1,4) print(r)