I have a custom health bar and it has a text in the middle showing you your actual number of health. But when Roblox goes to regen your health it goes to the like 20th decimal place and im just like whaaa.
So I was wondering if there is a way to round up to the nearest whole number or not count any decimal places. Or maybe even how do you turn off health regen all together (I may want to custom script my own health regen)
Anyone have any ideas?
Thank you for your time. Sorry there isnt any code, I figured this question doesnt really need the code.
-- UPDATE
I decided to paste my code
wait(2) game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.Health, false) local Player = game.Players.LocalPlayer local Character = Player.Character local Humanoid = Character:WaitForChild("Humanoid") local HealthBar = script.Parent.HealthBar local Background = script.Parent function Update() local HP = Humanoid.Health / Humanoid.MaxHealth script.Parent.HealthNumber.Text = Humanoid.Health HealthBar:TweenSize(UDim2.new(HP, 0, 1, 0), "Out", "Bounce", .1) wait(.1) end Update() Humanoid.Changed:connect(Update)