Roblox Wiki
Advertisement
Roblox Wiki

Random, introduced in December 2017 [1] and released on January 3, 2018, [2] is an object that generates numbers more random than math.random does. It can be constructed via Random.new(). Optionally, a seed can be passed to it.

Methods

Pubmethod.gif int NextInteger(int min, int max)

Returns a pseudorandom int between min and max.

Pubmethod.gif double NextNumber(double min = 0, double max = 1)

Returns a pseudorandom double between min and max.

Pubmethod.gif Random Clone()

Returns a new Random with the same state as this one.

References


Advertisement