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)

1 comment
isn’t the variable supposed to be Healths because Health is unknown