oncollisionenter if inputgetmousebuttondown

can anyone help me with my script i don’t get what i’m doing wrong i wan’t a moving block that can you can only move when the sensor (which is attached to the player) is touching it this is hat i have but i can’t find out whats wrong with it please help

function OnCollisionEnter (collision : Collision)
{

if(collision.Collider.tag == (“sensor”)){

if (Input.GetMouseButtonUp(0)
)

	rigidbody.AddForce (Vector3.up * 200);

}
}

if(collision.gameObject.tag == “Sensor”){
if(Input.GetMouseButtonUp(0)){
rigidbody.AddForce (Vector3.up * 200);
}
}

Try this.

And make sure you have a rigidBody attached to your GameObject