Collider isn't working ?

I’ve got 2 colliders one of them is Sphere and one of them is Box collider as you can see here;


I’ve written this code for detecting interaction

function OnCollisionEnter(theCollision : Collision){
if ( == "Sphere"){


Score Controller carries the code, They are not set as trigger (both of them) score controler is Children of a prefab. What did i done wrong ?

one of the collider/Trigger object has to have a rigidbody component attached to it, otherwise those functions dont work
p.s you can set the rigidbody to isKinematic only to make it not mess up your collisions

If you have already have rigidbody2d attached to object but then also it does not work then set rigidbody2d to dynamic and gravityscale to 0 and it should work.