I'm trying to create a custom Health GUI to replace the default Health Coregui. Whenever I take damage, it shows decimal numbers after a digit, for example, 70.002944, but this happens only when the Health increases.
local Humanoid = game.Players.LocalPlayer.Character.Humanoid
local currentHealth = Humanoid.Health
Humanoid.HealthChanged:connect(function(health)
local change = math.abs(currentHealth - health)
local healthText = script.Parent.Frame.HealthText
healthText.Text = "HEALTH:"..currentHealth
currentHealth = health
end)

2 comments
Is this in the GUI and is it a local script?
It is in a GUI, and its in a local script.