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

How can I make a player immortal?

Asked by 7 years ago
Edited 7 years ago

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

Log in to vote
4
Answered by
Peeshavee 226 Moderation Voter
7 years ago

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!

0
Setting MaxHealth to 0 removes it altogether. DepressionSensei 315 — 7y
0
This works perfectly, thanks Peeshavee. Programical 653 — 7y
Ad
Log in to vote
0
Answered by 7 years ago

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?

0
If they have 10000 health, they can still die. Forcefields often don't work and are ugly. Programical 653 — 7y
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 Script0rr 65 — 7y
Log in to vote
0
Answered by
Filipalla 504 Moderation Voter
7 years ago

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

Answer this question