Player Regening Health After Death

So a while back I made a ragdolling script, that I found out if the player resets or dies in a ragdoll state (Ragdoll is activated once platform stand is on, so its basically a weird version of platformstand) But when I use a Died function it doesn’t do anything at all. I attempted to unragdoll the player upon death, set his health to 0 again. Here is what im using so far.

script.Parent.Humanoid.Died:connect(function()
script.Parent.Humanoid.PlatformStand = false
Character.Humanoid:UnequipTools()
local Velocity = Instance.new(“BodyThrust”)
local thrust = Debris:AddItem(Velocity, .5)
Velocity.Parent = torso
Velocity.Force = Vector3.new(math.random(-600, 600), math.random(0, 0), math.random(-600, 600))
if Statistics.Head.Value == true then
head.face.Texture = “rbxassetid://145854465”
end
script.Parent.Humanoid.Health = 0

if Statistics.Head.Value == true then
	torso:WaitForChild("Neck"):Destroy()
end

if Statistics.LLeg.Value == true then
	torso:WaitForChild("Left Hip"):Destroy()
end
if Statistics.RLeg.Value == true then
	torso:WaitForChild("Right Hip"):Destroy()
end
if Statistics.LArm.Value == true then

	torso:WaitForChild("Left Shoulder"):Destroy()
end
if Statistics.RArm.Value == true then
	torso:WaitForChild("Right Shoulder"):Destroy()
end
Character.Humanoid.Health = 0

end)

2 Likes