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

How can I make a player immortal?

I want their humanoid to not take any damage. That's the most important thing. If possible, it would also be cool if I could make BreakJoints() not work on their character. Any ideas?

Right now I'm trying to make a script that regenerates lost limbs. It works, but I don't know how to attach the limb back to the torso.

3 answers

✓ Accepted answer

I did some research on this, and all I can find is to make the maxhealth a number, that is, in a way, infinity:

humanoid.MaxHealth = math.huge

I tried removing the MaxHealth property altogether, so that you won't have health, and won't be counted when damage is done to you, but I guess you can't delete properties. Hope this helped! If it did don't forget to accept my answer!

2 comments

0

Setting MaxHealth to 0 removes it altogether.

0

This works perfectly, thanks Peeshavee.

You mean so they cannot die? You can make their health like 10,000, or have a force field round them all the time, is that what your asking?

3 comments

0

If they have 10000 health, they can still die. Forcefields often don't work and are ugly.

0

They can still die, but it would be hard to kill them. You could always weld a box to them so if players try to kill the player they only hit the box, not the humanoid

i have not tested but in most values/properties you can use INF INF = Infinity

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