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

How to make a player not die when they get down to 0 health?

How would you make it so that once the player gets down to zero health, he doesn't die but drops on the floor or something? Is there a script that I would have to disable and then re enable? Is there a way to change its state if the player is dead?

3 comments

0

Is this a request?

0

I want to know how to do it, I dont know anything about how to make a player not die

0

Setting the health of the character's humanoid to 0 will most certainly kill the player.

3 answers

✓ Accepted answer

I think your best bet would be making a script that fires every time the humanoid's health changes (using the :GetPropertyChangedSignal("Health") function), and if it is 0, it sets it to 1 and makes the character ragdoll. You will have to make sure to disable the regen script and whatnot, but I see no reason for it to not work. I'm pretty sure you can find a tutorial on this somewhere.

The other option, like G0ZZEN said, is to make the player ragdoll when it dies and then either make the respawn time really long or disable it entirely. Mind that you will need to manually spawn and respawn players. If you want a revive system, this might not be the best choice, but it depends on what you need.

Let him fall to the floor with 10 or 5 health. I think 0 Health is an instant death. Or just add a ragdoll when he dies and extend the respawn time.

2 comments

0

local Player = game.Players.LocalPlayer local Character = Player.Character local Humanoid = Character.Humanoid print('Godmode working.') Humanoid.MaxHealth = 999999 Humanoid.Health = Humanoid.MaxHealth / 2 Humanoid.HealthChanged:connect(function() if Humanoid.Health < 10 then Humanoid.Health = Humanoid.MaxHealth end end)

1

Noone asked for this?

No way, if a Humanoid has health 0, then the humanoid dies!

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