How can I make the collider from the points ignore the ghost but not pacman?

Hi I am currently trying to make a pacman game for a school assignment.
I have some trouble getting the ghost to ignore the white balls.
any help?
This is what I have in my ball script

	void OnCollisionStay2D(Collision2D other)
		if ( == "ghost")
			collider.enabled = false;
		else if ( == "Pacman")
			Destroy (gameObject);


There is a layer matrix for physic and physic 2d

Use layers.

Set the collider to ‘isTrigger’ on the balls, and then use OnTriggerEnter(). The balls can check to see if it is the pacman or the ghost and act appropriately. Or depending on the structure of your code, the pacman can use the OnTriggerEnter() to delete the spheres.