local h local b=false for I,r in pairs(zombie:GetChildren())do if r:IsA("\080\097\114\116")and human.Health>0 then r.Touched:connect(function(I)if I.Parent.Name==chaseName and(I.Parent.Name~=zombie.Name and not b)then b=true h=time()local r=I.Parent local Q=getHumanoid(r)vars.Attacking.Value=true Q:TakeDamage(ZombieDamage)vars.Attacking.Value=false while wait()do if h~=nil and time()>=h+DamageWait then b=false h=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:TakeDamage(ZombieDamage)
				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
