tried to make a script where it runs a health:changed event and will display the amount of health you lost on a textlabel from a gui (gui called: HealthChange). the amount of health lost will be the value of a number value in repstorage. if you are confused on what i just said, heres the script.
local status = game.ReplicatedStorage.Status
local humanoid = game.Players.LocalPlayer.Character.Humanoid
local currentHealth = humanoid.Health
humanoid.HealthChanged:Connect(function(health)
while wait() do
local change = math.abs(currentHealth - health)
print("The humanoid's health "..(currentHealth > health and "decreased by ")..change..".")
status.Value = currentHealth
game.StarterGui.HealthChange.TextLabel.Text = status.Value
currentHealth = health
end
end)
not sure what to do, help

2 comments
PlayerGui, not StarterGui
oh k