Script math rounding?

I use very low numbers that scale up with levels in my game. Whenever trying to do the calculations for the final stat, I run into this:

print(config.BaseInsta.Value)
calcInsta.Value = config.BaseInsta.Value+(config.BaseInsta.Value*instaIncrease.Value)
print(calcInsta.Value)

image

0.02 turns into 0 for no reason?

For reference, instaIncrease.Value = 0 so calcInsta.Value should just be 0.02

1 Like

Is calcInsta a NumberValue object?

1 Like

IntValue

limit rip int val int value

An integer is always a whole number, if you want to use fractions/decimals use NumberValue

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.