Roblox Automatically Rounds My Number

Hey Guys. I’m trying to make a simple GUI which shows a value. Basically, this is how it works.
Script 1 will generate a value, and then set a IntValue to that, in which a Gui will pick up that value onto the Text.

Problem:
The IntValue is showing the rounded value of the original value.

Here is Script1, which generates the first value. (Just a portion of the script, I already referenced everything below above)

	local SecondsToArrival = LowestValue/100
	print(SecondsToArrival)-------------------------------Notice This Part
	TempSec.Value = SecondsToArrival

However, TempSec will always be rounded. BUT THE weird thing is, when I tried printing Seconds to Arrival, it shows the unrounded value. I’m actually really confuse.

I can’t do much since it’s such a simple script.

The GUI script works, but for those who are curious, here it is.

local text = script.Parent
local Value = workspace.TempValueSecondB

Value.Changed:Connect(function()
	text.Text = "PlatformB Seconds: "..Value.Value
end)

Conclusion, I need to clarify, both the IntValue and the Text are rounded, while the original value is not, since I printed, and it shows it.

Also, the decimals are not that long. It’s always only has 2 decimals places such as 50.62, 90.42.

Appreciate any help :grinning:

Int values cant handle decimals.
You need to use NumberValue

1 Like

Tysm and thanks for the fast response :grinning:

1 Like

And for more context, an integer is a whole number. Usually this is used for leaderboards in case of incorrect backend rounding.

1 Like

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