Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How could i go on about using math.random on UDim2.new?

I'm trying to use math.random with decimals.

How do i go on about doing this?

2 comments

0

Random.new():NextNumber().

0

That explains it! Thank you very much, submitting this as an answer would be great.

1 answer

you would maybe do

UDim2.new(math.random(10,100),math.random(10,100),math.random(10,100),math.random(10,100)) -- btw the numbers is like between so it randomizes between 10 and 100 if u didn't know tho 

thats one line btw bc it looks like its 2 lines but it isnt btw havent tested it idk if it will work tip : hover your mouse over my answer and click view source and copy the script only

2 comments

0

btw u can remove the numbers from math.random if u wanti t to be randomized in infinite nubers

0

This won't work. math.random utilizes integers, they asked for decimal precision.

This discussion is preserved as it was. New answers, comments, and votes are closed.