(ControllerColliderHit) won´t detect collition

Hey! Let me introduce myself first :smiley: My name is Paul, I´m new here… I just started using Unity and I love it!! I´m starting with this practice project where all I want is my “Contruction Worker” to hit a ball when he touches it. I have a scene with the contruction guy and the sphere over a terrain.
To reach my objective I wrote this js code and added it to the contruction guy:

var speed : float = 5;


function onControllerColliderHit (hit:ControllerColliderHit){
	if(hit.gameObject.tag == "ball"){
	Debug.Log("We hit the ball");
	hit.rigidbody.AddForce(transform.forward * speed);
	
	}

}

Problem is… ball doesn´t move… and debug doesn´t even send a message. I don´t understand why this is happening giving that both char and ball are detecting the terrain, even the ball bounces (I make it start a bit high so I make sure gravity is ok)

would you please help me solve this? Thankyou :smiley:

function onControllerColliderHit (hit:ControllerColliderHit){

should be changed to:

function OnControllerColliderHit (hit:ControllerColliderHit){

With capitol O :slight_smile: