Hello I am trying to make GUI that becomes more and more transparent as your Health goes lower does anybody have any idea like how it should be?
local humanoid = game:GetService("Players").LocalPlayer.Character:WaitForChild("Humanoid")
local gui = script.Parent
humanoid.HealthChanged:Connect(function()
local percent = humanoid.Health/humanoid.MaxHealth
gui.BackgroundTransparency = percent
end)
Keep in mind this script makes the transperancy goes higher as the health goes higher and when you're at 100% Health, it's just full transparent when I want it to be 0% Transparent when it's 100%
