Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My math.floor is rounding up help?

Asked by 5 years ago

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
0
is this real Psudar 882 — 5y
0
Lmao that's just how rounding works BlackOrange3343 2676 — 5y
0
Well, this script doesn't make any sense. The number should be truncated, no? Unless there's something you aren't showing us? DeceptiveCaster 3761 — 5y
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 woahsnake 4 — 5y
1
ICookies.Value = round(NCookies.Value) Overscores 381 — 5y

Answer this question