I have this health reading gui that reads character health and then converts it into a percent, but the problem is, the value has large amounts of decimal numbers, is there any way I can round off the decimals?
local player = game:GetService("Players").LocalPlayer
local char = player.Character
local Health = char:WaitForChild("Humanoid").Health
local MaxHealth = char:WaitForChild("Humanoid").MaxHealth
local Humanoid = char:WaitForChild("Humanoid")
local percent = (Health/MaxHealth) * 100
local healthtag = script.Parent.Frame.percent
healthtag.Text = percent.."%"
Humanoid.HealthChanged:Connect(function()
local Health2 = char:WaitForChild("Humanoid").Health
local MaxHealth2 = char:WaitForChild("Humanoid").MaxHealth
local percent2 = (Health2/MaxHealth2) * 100
healthtag.Text = percent2.."%"
end)
