How to check collision between playercontroller and a cube?

Alright so basically the cube will soon be a ladder, all scripting for that will be done later. the ladder has the name “TestLadder” and the controller still has the name “First Person Controller”. At the moment my script has.

function OnCollisionEnter(theCollision : Collision){
 if(theCollision.gameObject.name == "TestLadder"){
 Debug.Log("Collsion works");
 }
 }

I check my logs but nothing is there, help?

Read this, and then watch this and this. For collision to work, both of your objects must have a collider attached to them. If you want to physically have two objects collide with each other, one of the objects has to have a rigidbody component attached to it.