New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Still have questions? Join our Discord server and get real time help.
0

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

Edited 6 months ago

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?

0
Is this a request? Popularjon321 43 — 6mo
0
I want to know how to do it, I dont know anything about how to make a player not die zandefear4 90 — 6mo
0
Setting the health of the character's humanoid to 0 will most certainly kill the player. CeramicTile 847 — 6mo

0
Edited 6 months ago

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.

1
G0ZZEN 17
6 months ago

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.

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) Brayden_V86 8 — 6mo
1
Noone asked for this? G0ZZEN 17 — 6mo