Fall Damage OnCollisionEnter Script Help.

Ok so a very good person in the community helped me with an issue i had about falling damage and gave me the script you can see below. The thing is it doesn’t seem to work. I used a rigidbody for one of the colliders since this is an OnCollisionEnter but still nothing. The scene i am working right now has the first person controller on a cube up in the air and i want him to take damage as soon as he hits the ground. For some reason the Plane is use for the floor won’t take the rigidbody and the test cube i used as my floor won’t work with the script. Any help?

Here is the script:

function OnCollisionEnter(hit : Collision){

if(hit.gameObject.tag == ("Floor"))
	Debug.Log("Take Damage");

}

if(hit.gameObject.tag == (“Floor”))
Debug.Log(“Take Damage”);

What you did wrong is that the gameObject does not store the collision (At least that is what I think, lol). It is the collider. I think it should be this.

if(hit.collider.tag == ("Floor"))
    Debug.Log("Take Damage");

I am pretty sure you can remove the brackets too.