How can I make a trigger in 2d

Floating (float) point imprecision:

Never test for equality with floating point (float) variables. Here’s why:

How to report your problem productively in the Unity3D forums:

http://plbm.com/?p=220

How to understand compiler and other errors and even fix them yourself:

If you post a code snippet, ALWAYS USE CODE TAGS:

How to use code tags: Using code tags properly