change position and play animation

I have this frog AI that should go to a certain location using waypoint and while changing its position my object should play its animation jump.

here's my code but its not working

function Update () { var frog = GameObject.Find("try"); if (frog.transform.position(0>1,0>1,0>1)) animation.CrossFade("jump");

else animation.CrossFade("idle"); }

yes its changing its position but its not playing its animation? please help

Your ifcheck is always true. What are you trying to check?

Also, you should put the 'frog' declaration in Awake(), so it's not looked up every frame.

function Awake ()
{
   var frog = GameObject.Find("try"); // Set it once here, so it doesn't search every frame
}

function Update ()
{
   if (frog.transform.position(0+1,0+1,0+1)) // This will always be true - you are just setting the position
      animation.CrossFade("jump");
   else
      animation.CrossFade("idle");
}