Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make a player stay alive and not break joints when he dies?

Asked by 6 years ago

Simple as it is in the question.

I've seen some games do it and I want to do a revive script using defribilators. How do I do that? Sorry for the request

0
"How to make a player stay alive when he dies". Don't have the player die, then? If you want to disable the reset button then you can do that too. T0XN 276 — 6y
0
Not sure if I completely understand what you mean by this. T0XN 276 — 6y
0
They simply stay in the ground and do not reset/load character -.- wilsonsilva007 373 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

On a local script:

local player = game.Players.LocalPlayer

player.CharacterAdded:connect(function(char)
    char:WaitForChild("Humanoid"):SetStateEnabled(Enum.HumanoidStateType.Dead, false)
end)

This will literally make you unable to die (how cool is that!). With this being set, all you have to do now is have your revive script trigger whenever your character's health reaches 0.

You can also manipulate other HumanoidStateTypes.

Hope this helps!

0
Ty buddy wilsonsilva007 373 — 6y
Ad

Answer this question