So I'm trying to make my Mana round up from 0.5 or down from 0.49 and this current script doesnt work to round it?
P = script.Parent.Parent while true do wait(1) P.bin.Mana.Value = P.bin.Mana.Value + (P.bin.MaxMana.Value / 120) P.bin.Mana.Value = math.floor(P.bin.Mana.Value + 0.5) end
The error is in this part
P.bin.Mana.Value = math.floor(P.bin.Mana.Value + 0.5)
You are using a NumberValue instead of an IntValue. NumberValues are not guaranteed to give you integer values. If you want integer values, use IntValues.
Assuming you replace the two, here is your code but cleaned up and with proper rounding now that you can't set the intermediate calculation to the value.
local target = script.Parent.Parent local manaValue = target.bin.Mana while true do wait(1) local newValue = manaValue.Value + (manaValue.Value / 120) manaValue.Value = math.floor(newValue + 0.5) end