i know soem people will say tp put the health to 999999, but someones ganna want to challenge the npc until its 99999 health is down, so will i have to use a debounce oris it a humanoid property?
✓ ANSWER ACCEPTED
How do i make a humanoid have infinite health?
3 answers
✓ Accepted answer
I think your best bet is to make it simply unkillable. So once its health becomes lower than its maximum, it becomes the maximum.
------ You have not showed your code, so I cannot really start this off. Add a "local Character = way to the humanoid's parent"
local human = Character:WaitForChild("Humanoid")
human.HealthChanged:connect(function(health)
wait()
human.Health = human.MaxHealth
end
There might be an error, I'm not sure. I just made this and did not test in studio. Make sure the Max Health is something that is high enough, so it cannot be one shot killed.
There is a point where the numbers can't go any higher in ROBLOX so not exactly.
1 comment
0
@shasta342 yes just make sure it's in a LocalScript
local player = game.Players.LocalPlayer
local humanoid = player.Character:WaitForChild("Humanoid")
humanoid.MaxHealth = math.huge
1 comment
0
That should work :) Jesus loves you man :D Bless you
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
I agree, however the wait is unnecessary. Any unnecessary delay is a bad delay.
the wait() is pretty needed. It has no specific time, but here is the thing. It simply waits for the game to catch up, or at least I believe so.