local l local V=false for C,x in pairs(zombie:GetChildren())do if x:IsA("\080\097\114\116")and human.Health>0 then x.Touched:connect(function(C)if C.Parent.Name==chaseName and(C.Parent.Name~=zombie.Name and not V)then V=true l=time()local x=C.Parent local G=getHumanoid(x)vars.Attacking.Value=true G.WalkSpeed=0 local Y=script.Parent.Zombie:LoadAnimation(script.Parent.Attack)Y:Play()script.Parent.HumanoidRootPart.Theme:Stop()head.Jumpscare:Play()wait(.83)head.Hit2:Play()G:TakeDamage(ZombieDamage)wait(1)script.Parent.HumanoidRootPart.Theme:Play()vars.Attacking.Value=false while wait()do if l~=nil and time()>=l+DamageWait then V=false l=nil end end end end)end end


local damagetime
local damagedb = false

for _, zambieparts in pairs(zombie:GetChildren())do
	if zambieparts:IsA'Part' and human.Health > 0 then
		zambieparts.Touched:connect(function(p)
			if p.Parent.Name == chaseName and p.Parent.Name ~= zombie.Name and not damagedb then -- damage
				damagedb = true
				damagetime = time()
				local enemy = p.Parent
				local enemyhuman = getHumanoid(enemy)
				vars.Attacking.Value = true
				enemyhuman.WalkSpeed = 0
				local animation = script.Parent.Zombie:LoadAnimation(script.Parent.Attack)
				animation:Play()
				script.Parent.HumanoidRootPart.Theme:Stop()
				head.Jumpscare:Play()
				wait(0.83)
				head.Hit2:Play()
				enemyhuman:TakeDamage(ZombieDamage)
				wait(1)
				script.Parent.HumanoidRootPart.Theme:Play()
				vars.Attacking.Value = false
				while wait() do
					if damagetime ~= nil and time() >= (damagetime + DamageWait) then
						damagedb = false
						damagetime = nil
					end
				end
			end
		end)
	end
end
