I have a mana system and a specific attack will drain this as the mouse button is held down. The lowest float I set it to (1) still drains it too fast. But I can’t drop below that because I get the “cannot implicitly convert type” error. This is from the mana system script:
However, I don’t know if the lerping would actually change the manaValue when rounding the end result. A better way would be to make the manaValue a float and display it with Mathf.RoundToInt if you don’t want decimals in your GUI. Generally speaking, if lerping and similar operations are involved, it’s best to make the variable a float and not an int. If you really want to keep it as an int, you can also consider slowing the rate at which it decreases, for example with a CoRoutine that waits a certain amount of time between decreasing the amount by 1.