game.Players.LocalPlayer.Character.Humanoid.Health.Changed:connect(function()
local health = game.Players.LocalPlayer.Character.Humanoid.Health
local healthbar = game.StarterGui.HealthandKiGUI.BackOfHealth.Healthbar
if health < 100 then
healthbar.Size = UDim2.new(1, 0, 1, 0) - UDim2.new(0, 0, health/0.01, 0)
end
end)
What is wrong with it?

2 comments
To display anything to the output for debugging you need to use print(Tuple params) like print("any text and data if you concatenate it to the string")
health/maxhealth?