This is because NumberValues can store numbers up to 15 digits of precision, but this is okay. What I would do is use a precise rounding function for the TextLabel. Here is one that I made previously:
local function GetTens(number)
-- Convert number to string
local decimalString = tostring(number):split('.')[2]
if not decimalString then
return 1
-- String is in scientific notation
elseif decimalString:sub(1, 1) == 'e' then
local digits = tonumber(decimalString:gsub('%D', ''))
if digits then
return 10 ^ digits
else
return 1
end
else
return 10 ^ #decimalString
end
end
local function RoundTo(number, multiple)
local tens = GetTens(multiple)
local roundingFactor = multiple * tens
return math.round(number * tens / roundingFactor) * roundingFactor / tens
end
--Example: round NumberValue number to nearest hundredth for TextLabel
local number = numberValue.Value
local roundedNumber = RoundTo(number, 0.01)
textLabel.Text = roundedNumber