Ok, so I made a script that generates smooth Roblox terrain, but it requires a random seed and I don't want to have the same map twice. So I'm getting my seed by
local diffnum = (tick()*10000)
local Seed = math.randomseed(diffnum)
This works, but the seed is so large that there is barely a difference between seeds.
Example =
->15622355456157
->15622355736583
What I want to do is remove the first 7 digits of the number so I get
->5456157
->5736583
Any help with this? Thanks.
local Number = 23123213 --example local StringNumber = tostring(Number) --Makes the number a string so we can do :sub on it local NeededOne = StringNumber:sub(StartingDigitWanted, EndingDigitWanted) --the numbers you want until it meets the digits you don't want local NeededTwo = StringNumber:sub(StartingDigitWanted, EndingDigitWanted) --the numbers you want after the digit(s) is found local FinalString = NeededOne .. NeededTwo --Puts the digits back together local FinalNumber = tonumber(FinalString) --Makes the string back into a number