Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make it so the player doesn't die upon reaching 0 Humanoid.Health?

I want the player to still be alive when they reach 0 health.

3 comments

0

I’m not sure that this can be done, but you can add a health check in scripts that damage the character so that he does not take damage when he has 1 health, thus make 1 health = 0 health and make a custom health bar where 1 hp will be displayed as 0.

0

This site is not a request site! And it IS possible.

0

I don't think this is possible, but maybe you can set the value to be as low as possible (i.e 0.01)

1 answer

Disable the Dead state on the humanoid This needs to be done locally, I'm not sure why

game.Players.LocalPlayer.CharacterAdded:Connect(function(character)
	local humanoid = character:WaitForChild("Humanoid")
	humanoid:SetStateEnabled(Enum.HumanoidStateType.Dead, false)
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.