.Changed and :GetPropertyChangedSignal Not Detecting Change

Hey developers,
I’m currently using a :GetPropertyChangedSignal event to detect change in the player’s power value.

player.leaderstats.Power:GetPropertyChangedSignal("Value"):Connect(function()
print("Changed")
end)

My game has a lot of pretty big numbers, such as Quintillions, Nonillions, Septillions, and so on. They are stored within the player’s Power (which is a NumberValue). When the player punchs and gains a small amount of power, the event doesn’t detect it. For example, when the player gains 3 thousand powe when they have 5 Septillion power, the event doesn’t detect that.

Is there a way I could fix that?

Maybe its because it passes the 32 bit intenger?, a way you could fix it is instead of saving the entire number you save:

  • A number from 1-1000
  • The value of that number (If its k,m or b and so on)

You would have to change your entire system but that fixes the problems and makes it easier to display the numbers

Try using the .Changed event instead of GetPropertyChanged.

You are correct. It can be tested like this: print(5*10e24 + 3000 == 5*10e24) --true.

To fix it, use a bignum library to store large numbers and change your design so stats aren’t stored in ValueObject objects but in tables, and only use leaderstats as a display for stats (i.e. not storage of stats).