Health not updating and breaking my block system

ok soo i got this basic code that disables blocking if the player is stunned or dead

-- services
local players = game:GetService("Players")
local run = game:GetService("RunService")
-- code
players.PlayerAdded:Connect(function(p)
	local hchange
	p.CharacterAdded:Connect(function(c)
		local human = c:WaitForChild("Humanoid")
		local ldata = p:WaitForChild("LDATA")
		
		local function stunned() 
			return ldata.stun.Value > 0 or ldata.ragdoll.Value == true 
		end
		
		local function update()
			if stunned() or human.Health <= 0 then
				ldata.blocking.Value = false
				print(stunned(),human.Health <= 0)
			end
			
			if stunned() then
				human.WalkSpeed = 0
				human.JumpPower = 0
			else
				local extra = 0
				
				if ldata.blocking.Value == true then
					human.WalkSpeed = 5+extra
					human.JumpPower = 0
				else
					human.WalkSpeed = 16+extra
					human.JumpPower = 50
				end
			end
		end
		
		run.Heartbeat:Connect(update)
		for _,value in ipairs(ldata:GetChildren()) do
			value.Changed:Connect(update)
		end
	end)
end)

everything works fine, until the player dies, after the player respawns, the script (server) still thinks the player has 0 health, HOWEVER, all other scripts (also server) dont get that issue, i had it connected to health changed and changed it to run service because of that issue and i still has it, idk what to do anymore

i did the print test and i found out that the health changed event was stacking everytime the player died, first death it fired 2 times, second death it fired 4 times, idk what is happening anymore

Make sure to disconnect any unnessesary events when character respawns to prevent events from stacking.

i tried that but didn’t change anything at all

hello can u plz answer im still having the problem

How exactly are you disconnecting events when the player respawns?