im trying to display my Number Value with a IntValue, im not trying to have decimals while displaying. but my math.floor isnt working, help? my math.floor is rounding up. .5-.9 goes up to the next integer

local function round(n)
	return math.floor(n)
end

while true do
	round(NCookies.Value)
	ICookies.Value = NCookies.Value
	CookieCounter.Text = (ICookies.Value).." cookies"
	wait()
end

5 comments

0

is this real

0

Lmao that's just how rounding works

0

Well, this script doesn't make any sense. The number should be truncated, no? Unless there's something you aren't showing us?

0

the only thing i never told was that NCookies = NumberValue verison, And ICookies is intValue verison. i legit dont know why this isnt working

1

ICookies.Value = round(NCookies.Value)