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[]
NextInteger(min: int, max: int): int[]
Returns a pseudorandom int between min and max.
NextNumber(min: double = 0, max: double = 1): double[]
Returns a pseudorandom double between min and max.
Clone(): Random[]
Returns a new Random with the same state as this one.
Referenced by[]
The Random data type is not referenced by any members in the API.
References[]
| Basic Lua types | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Roblox types |
| ||||||||||||||||||||||||||
| API reference only | |||||||||||||||||||||||||||