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

How would you make it so a player cannot Break the Joints of the player when health hits 0?

I would like to make a script where you cannot die, it should be relatively simple I just don't know how to do it and I don't want to use the MakeJoints() thing because I am afraid it would just lag, since you have to do it exactly when the player dies, I'm pretty sure there is like a line of code that use to stop it, but i do not remember it from the top of my head.

2 answers

set Health to something huge, like 11240586248957602984756092845760982475698247569827456908274598672495867290458672098457620945068.

Yes your player may die, but that likely wont happen.

local Humanoid = game.Players.LocalPlayer.CharacterAdded:Wait():WaitForChild("Humanoid");
Humanoid.HealthChanged:Connect(function()
    Humanoid.Health = 100;
end)

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