# OnCollisionEnter not working ? (636995)

**URL:** https://discussions.unity.com/t/oncollisionenter-not-working-636995/636995
**Category:** Scripting
**Tags:** Scripting
**Created:** [August 19, 2016, 3:20pm UTC](https://discussions.unity.com/t/oncollisionenter-not-working-636995/636995 "2016-08-19T15:20:23Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Julian-Dicken](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@Julian-Dicken](https://discussions.unity.com/u/Julian-Dicken)
#### Post date: [August 19, 2016, 3:20pm UTC](https://discussions.unity.com/t/oncollisionenter-not-working-636995/636995/1 "2016-08-19T15:20:23Z")

</div>

void OnCollisionEnter(Collision col)  
{  
if (col.gameObject.tag == “weapon”)  
{  
col.gameObject.active = false;  
gameObject.active = false;  
}  
}

this isnt working … i have colliders attached to the wepaon and the gameobject  
EDIT : fixed it … i forget the rigidbody every time 😄

---

<div class="post-metadata">

### Author: ![hellojbb1234](https://avatars.discourse-cdn.com/v4/letter/h/2acd7d/32.png) [@hellojbb1234](https://discussions.unity.com/u/hellojbb1234)
#### Post date: [December 21, 2016, 11:36pm UTC](https://discussions.unity.com/t/oncollisionenter-not-working-636995/636995/2 "2016-12-21T23:36:31Z")

</div>

I have the same irritating problem
