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

I honestly have no idea, what does Random.new() do?

I have no idea what the Random.new() constructor does. For me, all it did was return 'Random'.

1 answer

the constructor is a seed. Basically, the seed determines what the random number will be. for example, if you did Random:NextInteger(1,10) the random number that will be printed depends on the seed. If the seed was 58482, it might print 2. But if the seed was 948193, it could print 8.

its kind of like minecraft. if the seed was 94829184928, you could spawn in a snow biome. the seed dictates the number

so by creating a new Random, you pass a seed into the constructor that will give it its “randomness”

1 comment

0

I tried entering random numbers but all it returned for me was 'Random'.

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