Player health set to 0 but still living when breakjointsondeath is set to false

I have this script which is of an alien plant that grows out of the belly of a player and then kills him. I set breakjointsondeath to false so the player doesnt fall apart when dying. For some reason however, the player doesnt die when health is set to 0. Their health starts to regenerate like nothing is wrong. When pressing the reset button in the roblox menu, the health gets set to 0 but then the health jumps back to where it was before resetting. I tested this in a new place to make sure it wasnt some other script interfering and it still happened. Does anyone know what is going on?
This is the script:

task.wait(10)

script.Parent.Texture1:Destroy()
script.Parent.Parent.Humanoid.PlatformStand = true
local force = script.Parent.Attachment:Clone()
force.VectorForce.Enabled = true
game.Debris:AddItem(force,.2)
force.Parent = script.Parent.Parent.Head
task.wait(.5)
script.Parent.ParticleEmitter.Enabled = true
task.wait(2)
local plnt = game.ServerStorage.PlantBelly:Clone()
plnt:PivotTo((script.Parent.CFrame * CFrame.new(0, -.3, -0.172)) * CFrame.Angles(math.rad(-90),0,math.rad(-90)))
script.Parent.PrismaticConstraint.Attachment1 = plnt.Main.PrismaticAttachment
plnt.Parent = workspace
game.Debris:AddItem(plnt,60)
script.Parent.PrismaticConstraint.TargetPosition = 0.85
game.TweenService:Create(plnt.Main.Mesh,TweenInfo.new(1.35),{Offset = Vector3.new(0.75,0,0),Scale = Vector3.new(2.5,1,1)}):Play()
local rootamount = math.random(3,8)
for i=1,rootamount do
	local root = plnt.Root:Clone()
	root.Transparency = 0
	local size = math.random(1000,2189)/1000
	root.Parent = plnt
	if math.random(1,2) == 1 then
		root.CFrame = CFrame.new(root.Position) * CFrame.Angles(0,math.rad(360/rootamount*i+math.random(-10,10)),0)
	else
		root.CFrame = CFrame.new(root.Position) * CFrame.Angles(math.rad(180),math.rad(360/rootamount*i+math.random(-10,10)),0)
	end
	game.TweenService:Create(root,TweenInfo.new(1.35),{Size = Vector3.new(2.564*size,0.229,.895*size), CFrame = root.CFrame * CFrame.new(-2.564*size/2,0,0)}):Play()
end
task.wait(1.55)
script.Parent.ParticleEmitter.Enabled = false
script.Parent.Anchored = true
for i=1,5 do
	plnt.Main['HingeConstraint'..i].TargetAngle = 0
end
task.wait(2.3)
script.Parent.Parent.Humanoid.BreakJointsOnDeath = false
script.Parent.Parent.Humanoid.Health = 0
for i,v in pairs(plnt:GetChildren()) do
	v.Anchored = true
	v.CanCollide = true
end

In the output window i saw these logs:


It appeared when I open the roblox menu.

It can’t die because BreakJoinsOnDeath is false.

You could try to get their HumanoidRootPart and then :Destroy() it. This effectively kills the player. Otherwise, try setting their health to a negative number. Not sure if the latter would work.