i have made a script to destroy the gameObject when it is shot by an arrow. However nothing happenes.

Several things to check. I’ll take you through what my thought process would be:
- First things first, get the easy stuff out of the way. I’d put a debug in the OnTriggerEnter2D outside of your if statement to see if anything is triggering at all. Also, double check that this script is attached to an object.
1a. If it’s triggering with the object but not hitting the if statement, then the tag probably isn’t assigned.
1b. My guess to the most likely problem: If It’s not triggering, you’re most likely missing a rigidbody on either this object, or the arrow. You only need one rigidbody for it to work. If you don’t want the physics, just check “isKinematic”
- If none of that worked, be sure that the object this script is on has a collider with “isTrigger” checked.