OnCollisionEnter not working?

Hey im trying to get a simple guitext to turn on when a collider is hit. I’ve put a cube in the scene, turned of it’s mesh renderer, and given it the name “win” and a rigidbody, on my player character i have this script attached, but it doesn’t detect the collision?
and yes, i did link the guitext to the guiWin variable…

var guiWin : GUIText;
function Start () {
	guiWin.text = " ";
}

function Update () {

}

function OnCollisionEnter(col : Collision){
	if(col.collider.name == "win"){
		guiWin.text = "you win";
		print("collison detected");
	}
}

OnCollisionEnter can be very tricky to get your head around when using it in a new situation. The Unity Scripting Reference for OnCollisionEnter states “Note that collision events are only sent if one of the colliders also has a non-kinematic rigidbody attached.” Have a look at your objects and ensure that at least one of them has a rigidbody attached and “Is Kinematic” is not ticked.

What isn’t mentioned on the page for OnCollisionEnter is that collisions with a Player Controller in most situations will not work. If you have a Character Controller component on your player, consider using OnControllerColliderHit