I’m trying to use a string of 6 characters as a seed to generate numbers. These generated numbers must be within a set range. How would I do this?
1 Like
Wouldnt you seed the random number generator with
math.randomseed(‘your seed value’)
then for the range, if you want non integers, you would
for a non integer between 50 and 100
minRange = 50
maxRange = 100
rangeDiff = maxRange-minRange
value = (math.random()*rangeDifference)+minRange
or
local rng = Random.new (‘your seed value’)
then for the range, if you want non integers, you would
for a non integer between 50 and 100
minRange = 50
maxRange = 100
rangeDiff = maxRange-minRange
value = (rng:NextNumber()*rangeDifference)+minRange