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 4 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 — 4y
0
Lmao that's just how rounding works BlackOrange3343 2676 — 4y
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 — 4y
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 — 4y
1
ICookies.Value = round(NCookies.Value) Overscores 381 — 4y

Answer this question