Stop Drooling Zombies From Killing Each other

I was working on a game where randomized disasters occur every 10 seconds, and the drooling zombies keep killing each other.

Before you call me out, yes I read the other posts BUT I do not know what to really change and where to change things.

If anyone can please help me do something in which I can stop the drooling zombies from killing each other, please do help.

Can you send the script please?

It’s a free model made by Roblox called “Drooling Zombie”. Sorry for any confusion.

The default Roblox drooling zombie should already have an ignore list for the other zombies.

	CanSeeTarget.Evaluate = function()
		if model then
			-- Get list of all nearby Zombies and non-Zombie humanoids
			-- Zombie list is used to ignore zombies during later raycast
			local humanoids = HumanoidList:GetCurrent()	
			local zombies = {}
			local characters = {}
			for _, object in pairs(humanoids) do
				if object and object.Parent and object.Parent:FindFirstChild("HumanoidRootPart") and object.Health > 0 and object.WalkSpeed > 0 then				
					local torso = object.Parent:FindFirstChild("HumanoidRootPart")
					if torso then
						local distance = (model.HumanoidRootPart.Position - torso.Position).magnitude
						if distance <= configs["AggroRange"] then
							if object.Parent.Name == "Drooling Zombie" then
								table.insert(zombies, object.Parent)
							else
								table.insert(characters, object.Parent)
							end
						end	
					end	
				end
			end	
			
			local target = AIUtilities:GetClosestVisibleTarget(model, characters, zombies, configs["FieldOfView"])
			if target then
				ZombieTarget = target
				return true
			end
function utility:GetClosestVisibleTarget(npcModel, characters, ignoreList, fieldOfView)
	local closestTarget = nil
	local closestDistance = math.huge
	for _, character in pairs(characters) do
		local toTarget = character.HumanoidRootPart.Position - npcModel.HumanoidRootPart.Position
		local toTargetWedge = toTarget * Vector3.new(1,0,1)
		local angle = math.acos(toTargetWedge:Dot(npcModel.HumanoidRootPart.CFrame.lookVector)/toTargetWedge.magnitude)
		if math.deg(angle) < fieldOfView then
			local targetRay = Ray.new(npcModel.HumanoidRootPart.Position, toTarget)
			local part, position = game.Workspace:FindPartOnRayWithIgnoreList(targetRay, ignoreList)
			if part and part.Parent == character then
				if toTarget.magnitude < closestDistance then
					closestTarget = character
					closestDistance = toTarget.magnitude
				end
			end
		end
	end
	return closestTarget
end

I don’t understand what the problem is. Are you sure you’re using the same zombies? Did the ones you pick have the badge by their thumbnail?

I changed the name to “”, so where is the script for that so I can configure it to the point where it stops killing each other?

You can disable their nametags by setting the DisplayDistanceType in the Humanoid to None

It kind of works, but they just keep falling apart now?

??? Did you set their actual health to 0?

No I did not

filerwordswhereeu32euw

Get a new copy of the ‘Drooling Zombie’ model and apply the modification suggested here.

Oh ok well when the script detects whether the target is a humanoid, just add:
and not target.Parent.Name == “Zombie”
This will check whether to make sure the target part is not parented to a zombie.

Are you sure that you are using the right Drooling Zombie free model? Because I used this Free Model for Drooling Zombies, and they are not attacking each others.

1 Like

You can simply add the Zombies to a folder if I’m not wrong.

This here solved it for me. If your using the “Drooling Zombie” from Roblox Themselves, in your module scripts check for HumanoidList and replace this on line 10:

“if object:IsA(“Humanoid”) and object.Parent.Name ~= “Zombie” then”

1 Like