You could try having multiple IntValues, one for months, one for days, seconds, etc. This will increase its storage capacity by a lot. Actually, I am not sure myself if you can actually exceed the maximum value of an IntValue
you could try using strings and using string manupulation if you don’t want to use the better other solutions that have already been posted.
Adding "700000000" and 500 would be something like this:
local OldValue = "700000000"
local AddValue = 500
AddValue = tostring(AddValue)
local ToAddTogether = string.sub(OldValue, -1 - #AddValue) -- # is length, taking another character in case the other number is too large
-- Example: 99 + 2 is 101, which is 3 characters long when added, so we need that extra character
ToAddTogether += AddValue
ToAddTogether = tostring(ToAddTogether)
local AddedValue = string.sub(OldValue, 0, #OldValue - #ToAddTogether) .. ToAddTogether
print(AddedValue) -- 700000500
Strings aren’t numbers so don’t suffer from floating point issues, and smaller ints don’t suffer from the errors either.
Note going back to number can make it have floating point issues, so I would only take from the value and convert to number, never taking the number and converting it to a string and write that back to the saved value, as that could add/remove 100s of thousands of your units from the real value.
What if you just made the actual value used in the scripts be whatever’s in the IntValue (make it a NumValue instead for decimals) times a large number, like 1000 or something.
This would mean that when you have 0.001 in the IntValue, when you use the IntValue in a script it multiplies that value by 1000 to equal 1. You’d do this whenever you need to make an calculations in a script/localscript.
I know it’s a strange workaround, but just an idea.