Getting seed from Random.new()

I was wondering if there was anyway to fetch the seed from a Random.new() constructor, which hasn’t been fed a seed. However, if their is no possible way of this, is their a way to replicate the way roblox generates random seeds for Random.new()?

From what I can tell, you are unable to retrieve the seed from a Random object. As far as replicating the seed generation, it only says "If you don't provide the seed parameter, Random uses a seed from an internal entropy source.". Using math.random() should be close enough to the internal source, so you can just generate a number between -9007199254740991 and 9007199254740991, and use the generated value both as the seed in Random.new(), as also store it somewhere for later use.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.