Prevent Humanoid Death

How would i keep the humanoid alive, So even when the player resets, They can still be healed and will act as if they weren’t dead?

I have tried to google it but it seems there’s no topic about it, Or i can’t find it due to my browser
https://gyazo.com/a8484f8ad45c5cf45879f3de5e46eb85
As seen here, Yes i know it’s a bit hard to see, But in the end i get respawned without using loadcharacter, I just get healed.

THAT ^ is basically what i’m trying to achieve, Healing a player after death without having to respawn them, Is this possible?

1 Like

Disabling resetting :’) and make it so when you want to kill the player just do whatever you want to do to them and then teleport the CFrame to a specific place?

I want resetting to be thing, And the gif also doesn’t teleport the player. (Not that i think)

Well, when the humanoid dies make it end and then do what you want to the character, so it still detects when the health hits 0 but it doesn’t break limbs or anything :slight_smile: Or If that doesn’t work make it happen at 1 HP I believe.

Make it end? What do you mean with this?

Humanoid.Died:Connect(Function()
Humanoid:SetStateEnabled(Enum. HumanoidStateType. Dead, false)
end)

1 Like

Wouldn’t it be too late? Died fires after the character’s already been killed

You could remake the joints i guess

local plr = game.Players.LocalPlayer
repeat wait() until plr.Character and plr.Character:FindFirstChild("Humanoid")
local hum = plr.Character['Humanoid']
hum.HealthChanged:connect(function(health)
	if health<= 0 then
		hum.Health = hum.MaxHealth
		plr.Character:MakeJoints()
	end
end)

To make the character appear as if it were not dead after resetting, do character:PivotTo(last known cframe) after calling player:LoadCharacter().

If you want to get the last cframe, you can do character:GetPivot(), then plug in to what I said above.

To solve the healing part, after using LoadCharacter(), that is when you want to set the Humanoid’s health to whichever the lowest you prefer.

Not sure if I’m understanding correctly here, but if they press the reset button you want them to remain alive and something else to happen? You can use ResetButtonCallback

local resetBindableFunc = Instance.new("BindableEvent")

resetBindableFunc.Event:connect(function()
	print("the player tried to reset but he cant because of this event")
	-- do whatever ya want here
end)

game:GetService("StarterGui"):SetCore("ResetButtonCallback", resetBindableFunc)
4 Likes

The game might be using a custom death and HP system.

Have you disabled BreakJointsOnDeath? You could disable that and detect if the players health is less than or equal to 0 using HealthChanged
Something like this

Humanoid.HealthChanged:Connect(function(health)
  if health <= 0 then 
--do whatever
  end
end)

This was my first solution, But it isn’t quite what i wanted.

Now THIS i’ll have to try and see, You’ll hear back from me.

I’ll have to look into this too, If that’s the case i could make my own. TY

I have tried this yes, And it didn’t quite work because the character still can’t do anything after reviving them.

Oh this is great! That’s exactly what i need since i can just clamp the incoming damage for non-reset deaths, Thanks a bunch!

1 Like