you read the title; at line 21 it's referencing Health as a function???
local Player = game.Players.LocalPlayer local Healths = Player.Health function Change() local CurrentHealth = Player.Health.Value if CurrentHealth > 0 then print(CurrentHealth) else for i = 1,0,-.01 do script.Parent.BackgroundTransparency = i wait() end end end script.Parent.TextButton.Activated:Connect(function() script.Parent.Visible = false Health.Value == 100 end) Health.Changed:Connect(function() if Health.Value == 0 then Change() end end)
"==" indicates an equality comparison. On line 21, this simply evaluates to true/false. You are looking for the assignment operator "=," to set the health to 100. Also, based on your code, "Health.Value" should be replaced with "Healths.Value" since that is the name of the variable you initialized above.