So i made an simple random generator with an seed. But everytime it always returns the same number.
local rand=Random.new(seed) rand:NextInteger(10,30) -- always returns the same value
I also want my game to be based on 1 seed. Not that math.randomseed(tick()) thing. An similar post didnt seem to exist…
math.randomseed(tick())
That’s how it works. Seeds ensure that you can replicate a certain state multiple times. If you call the NextInteger function again, you will get a new value. Or, you can leave the seed parameter blank if you want the seed to be randomly chosen.
NextInteger
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.