For a long time, I’ve been dissatisfied with the quality of Roblox’s pseudo-random number generation. As a result, I’ve decided to take matters into my own hands by developing a true random number generator module. This module is extremely performant, lightweight, and easy to use. Here’s an example of how it works:
local TrueRandom = require(game:GetService("ServerScriptService").TrueRandom) local RNG = TrueRandom.new(1, 100) -- Minimum and maximum values for number generation. print(RNG:Next()) -- Prints a number between 1 and 100.
This module works by wrapping random.org’s true randomness API in an easy-to-use package for developers. It solves the issue of pseudo-random numbers making games too predictable and less fun to play.
With all that said and done, here’s the module:
TrueRandom Example.rbxl (30.4 KB)