Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Check if number goes below 70?

So im trying to change the color of a text labe if the health of the humanoid goes below 70

The script: (its a script not localscript)

local Humanoid = script.Parent.Humanoid
local HealthGui = script.Parent.Head.BillboardGui.Health

HealthGui.Text = ""..Humanoid.Health
Humanoid.HealthChanged:Connect(function()
	HealthGui.Text = ""..Humanoid.Health
end)

if Humanoid.Health < 70 then
	HealthGui.TextColor3 = Color3.new(1, 1, 0)
end

1 answer

✓ Accepted answer

Move lines 9 to 11 inside the HealthChanged function.

This discussion is preserved as it was. New answers, comments, and votes are closed.