I made a script, but it doesn't work. If any could help me it would be great
local Humanoid = game.Players.LocalPlayer.Character.Humanoid local currentHealth = Humanoid.Health Humanoid:GetPropertyChangedSignal("Health"):Connect(function() print(currentHealth) end)
Hello, ArvidSilverlock!
One way to know a players health at all times is by using the HealthChanged event. This will automatically tell you their new health wether it goes up or down. The script below should help you with your problem. If you find any errors feel free to reply and let me know
HealthChanged is just like the normal Changed event but it's used for health. This event will fire everytime the LocalPlayers health has changed.
Insert a LocalScript into StarterCharacterScripts and put the following code:
local Character = script.Parent local Humanoid = Character:WaitForChild("Humanoid") Humanoid.HealthChanged:Connect(function(NewHealth) print(NewHealth) end)