I have a shop system that works fine but for some reason, the “sell all” button sometimes generates an extra number like 2.90000006 which causes visual bugs with the UI, I was wondering if there was a possible fix with this, thanks in advance.
math.round
can be helpful here. Just do:
local RoundedNumber = math.round(Number * 10) / 10
and you should get a nice and clean number of 2.9 in your example.
1 Like
thank you, im having a slow brain day today and could not for some reason remember math.round existed
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.