✓ Accepted answer
First of all, let's make sure your script doesn't run before the LocalPlayer loads. To do that, we can use the following loop: repeat wait() until game.Players.LocalPlayer.Character;
Next, I inserted a function called round1Place, that you call with round1Place(NUMBERHERE) and it returns the same number but rounded to the first decimal point.
For example:
function round1Place(x)
return (x + 0.05 - (x + 0.05) % .1)
end
local r = 3.32
r = round1Place(r)
print(r)
print(round1Place(2.25))
Put it all together:
repeat wait() until game.Players.LocalPlayer.Character;
humanoid = game.Players.LocalPlayer.Character.Humanoid
function round1Place(x)
return (x + 0.05 - (x + 0.05) % .1)
end
while wait() do
script.Parent.Text = round1Place(humanoid.Health)
end
2 comments
What changes did you make? Explain what you did.
@TheContinentOfEurope Edited