Eyes do not change color on zombie death

The script I am using should turn the zombie npc’s eyes dark after it has been killed, but doesn’t. No error messages in the output. Just simply does not work.


if script.Parent.Parent.Humanoid.Health == 0 then 
	script.Parent.Color = Color3.new(0, 0, 0)
end

Is the line being looped? It will only run once if not. If it isn’t, try this:

script.Parent.Parent.Humanoid.HealthChanged:Connect(function(health)
	if health <= 0 then
		script.Parent.Color = Color3.new(0, 0, 0)
	end
end)

What this does is checks whenever the zombies health is changed, and if the health is lower or equal to 0, it will change the color.

2 Likes

isn’t working still. if it helps the script in question is called Eyescript and is located in the actual eye union.