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?
You are editing the StarterGui, which is the original gui that is cloned into player's PlayerGuis, not the gui being displayed to the player. So, you actually want healthbar
to be game.Players.LocalPlayer.PlayerGui.HealthandKiGUI.BackOfHealth.Healthbar