SendMessage walk has no recieveer

hello,
I am having a problem with some SendMessages, i have one for walk, one for reset and for gotHit, those are my only Sendmessages and they all say the same: SendMessage … has no reciever. hat i am trying to do here is to make the AI stop with his walking animation if he stops.

code for walk and reset:

var model : Transform;

function Start(){

walk();

}

function reset(){

model.animation.CrossFade("idle");

}

function walk(){

model.animation.Play("walk");

}

and here i send the message

if(velocity>0)
	transform.SendMessage("walk");
else
	transform.SendMessage("reset");

and for gotHit it is pretty much the same

please help me.

That should work. Are you sure the Transform your sending the message to (btw, it is the Transform of the script with “if( velocity …)”) has the script with walk and co functions ?

GameObject.SendMessage()

If you call SendMessage("Walk") on a GameObject named “Sally” and get a message saying there was no receiver, that implies there is no script attached to Sally which has an appropriate function to call.

Is the script sending the message attached to the same GameObject as the one you’re hoping will receive it?

I am following it from a tutorial on youtube and h had it in the exact same way and it woked for him. heres te link
link text

Oh, i already got it, I pasted the script on the wrong GameObject, thanks rutter. though I still get the error of gotHit, but I will take a look at that because i did not jet do that