I'm trying to create a GUI that goes to a random co-ordinate on the screen, but from my knowledge math.random only works with whole integers, I was thinking about dividing the math.random by 2, but then I would get a higher value than anticipated. Would my best bet be to make a table of values and chose a random index number to achieve this? or is there another stock method to get this done?
NOTE: I'm talking about absolute position of the GUI, not the offset. (Absolute is between 0 and 1 for the active view port)
You Could Get A Random Number Thats Higher And Divide It, For Example:
(math.random(0,100)/100)
For Two Decimal Places, or
(math.random(0,10)/10)
For One Decimal Place