# Help with Life Math

hello developers, i really need your help my game is having a bug, the players have infinite life when it comes to “Qd” of power, i would like to know if someone can help me to create a math that works the Life of players up to the maximum number “Ct”, that is, I want an algorithm that makes a huge number fit with the number Supported by the “Health” of the player.

sorry if it gets confusing, I’m not sure how to explain

Many values in Roblox, including the Humanoid’s Health property, are stored in 32-bit floating point. Lua’s own numbers are stored in 64-bit format, which can store much larger numbers.

One of the limitations of 32-bit format is that numbers higher than 10 to the 38th power can’t be represented, and so saturate to infinity.

I’m guessing you’re building a game like Cookie Clicker where you end up with really big numbers representing some aspect of your player. One way to work around this might be to store a percentage as the player’s health instead of the direct value, although you would need to make sure to divide incoming damage by the amount of true health the player has.

3 Likes

Power ^ 0.35 would that be a possible solution?

If you wanted to utilise 64-bits, you could handle health and death manually aka through intvalues or storing temporary data about that player in code.

Of course that would mean changing the weapons or whatever you use to damage players into abiding with that format.