Script error: OnTriggerEnter

Hi, I was following the tutorial Roll-A-Ball. I kept getting this error:

Script error: OnTriggerEnter.
This message parameter has to be of type: Collider.
The message will be ignored.

I spent hours on checking where I did wrong, but still didn’t get it. It seems my OnTriggerEnter function never has been triggered. I checked the “Is Trigger” option in the box prefab. Please help!!!

	void OnTriggerEnter(Collider other)
	{
		if(other.gameObject.tag == "PickUp")
		{
			other.gameObject.SetActive(false);
		}
	}

In case anyone is reading this in 2019 and your problem isn’t that you’re using 2D objects, double-check that you did indeed use the word, ‘Collider’ as a parameter not ‘Collision.’ I couldn’t figure out my problem until I noticed I had used the wrong word. If you’re a newbie like me, this might have tripped you up.

void OnTriggerEnter(Collider other)

not

void OnTriggerEnter(Collision other)

This Error normally comes when u are trying to detect a 2D game object with
OnTriggerEnter(Collider other)
{
//Code inside
}

if you want to detect a 2D object you should have
OnTriggerEnter2D(Collider2D other)
{

//Code inside
}

hope this helps future persons,please remember OnTriggerEnter does not work for 2d objects detection,so if you are trying to destory a 2d object it will be OnTriggerEnter2D.

you have a script named Collider check for it and change the name

Good how I solved my mistake

public void OnTriggerEnter(Collider2D other){

	if (other.gameObject.tag == "Enemy"){
		game. GetComponent<Done_GameController>();

	}else if (other.gameObject.tag == "Point"){
		game.SendMessage("IncreasePoints");
	}		
}[link text][1]

Design Script error: OnTriggerEnter
This message parameter has to be of type: Collider
The message will be ignored.

Apparently the method signature has changed slightly I guess because it requires the following:

private void OnTriggerEnter(UnityEngine.Collider trigger)

I tried removing the class reference in the parameter and that’s how I was getting the error, even though I had the UnityEngine directive at the top of my class definition.