Help getting past intvalue/numbervalue limit

Hello! I’m making a clicking game and I made a clicking system and an upgrade system but I ran into a problem.

The issue is that there is a limit on IntValues and in my game you will be able to go much higher than the limit

I tried using StringValues for no number limit it works but adding/subtracting values together doesn’t work I also tried searching the forum but I found nothing useful. I then tried BigNum but it causes too much lag when pressing the button.

I appreciate any help!

May I ask, what’s the limit you need and do you need to lose precision? Can you explain further how using StringValues doesn’t work?
You can use NumberValue for this; I can’t think of any reason to use IntValues.

1 Like

Thanks for reminding me, I forgot to say that I’m trying to add values together and subtract values then I thought that using StringValues would go past the limit yes it does but I can’t add values or subtract them and even using number values at one point players will be able to pass it.

Edit: I edited the post with those information if anyone was wondering.

You can still use strings, to add and subtract just do
tonumber(stringval.Value)

1 Like

Apparently, I did something wrong in my script before and now it works thanks! :grinning_face_with_smiling_eyes:

This doesn’t really change anything. Strings will automatically try to convert to number if you perform arithmetic on them.

image

Not really, lol

The error implies that you’re trying to create a void expression, not because values are strings.
The source code says otherwise:

  TValue tempb, tempc;
  const TValue *b, *c;
  if ((b = luaV_tonumber(rb, &tempb)) != NULL &&
      (c = luaV_tonumber(rc, &tempc)) != NULL) {
    lua_Number nb = nvalue(b), nc = nvalue(c);
1 Like

right right you’re right I actualy did a mistake