- Home /
Ignore Collision with Tag Error.
Hello .
I got this error message: MissingComponentException: There is no 'Collider' attached to the "Player(Clone)" game object, but a script is trying to access it. You probably need to add a Collider to the game object "Player(Clone)". Or your script needs to check if the component is attached before using it.
Technically I throw an instantiated prefab (grenade), and I don't want it to collide with the Player, I use this in the "grenade" script:
function Start(){
Physics.IgnoreCollision(gameObject.FindWithTag("Player").collider , transform.collider);
}
//... rest of code.
I have my Player (Character Controller) tagged as "Player". The most weird thing is that it happens sometimes, just I restart Unity and everything goes well, but after some time this error appears.
Any help is appreciated.
Thanks.
Answer by Ozzyel-PT · Aug 25, 2013 at 08:32 AM
I think it's fixed now, just reinstalled Unity.