move the character to the clicked hit.point

The problem is that the if statement applied once, it rotates it a bit to the hit.point location, and doesn't even move because it's not rotated to the hit.point, even if i remove the rotate stuff, it moves a lil bit to the hit.point , what's wrong with the script? It's FPSWalker script modified with AIFollow script from the A* Pathfinding..

  var speed = 6.0;
    var jumpSpeed = 8.0;
    var gravity = 20.0;

    private var moveDirection = Vector3.zero;
    private var grounded : boolean = false;

    var rotationSpeed : float = 5.0;
    private var position : Vector3;
    var hit : RaycastHit;

    private var controller : CharacterController;

    function FixedUpdate() {
        var ray = Camera.main.ScreenPointToRay (Input.mousePosition);
        if (Physics.Raycast (ray, hit, 300) && hit.collider.tag == "Terrain" && Input.GetButtonDown("Fire1")) {

            controller = GetComponent (CharacterController);
            var direction : Vector3 = hit.point - transform.position;
            // Rotate towards the target
            transform.rotation = Quaternion.Slerp (transform.rotation, Quaternion.LookRotation(-direction), rotationSpeed * Time.deltaTime);
            transform.eulerAngles = new Vector3(0, transform.eulerAngles.y, 0);

            // Modify speed so we slow down when we are not facing the target
            var forward : Vector3 = transform.TransformDirection(Vector3.forward);
            var speedModifier : float = Vector3.Dot(forward, direction.normalized);
            speedModifier = Mathf.Clamp01(speedModifier);

            // Move the character
            direction = forward * speed * speedModifier;
            controller.SimpleMove(direction);
        }

        animation.wrapMode = WrapMode.Loop;
        if (grounded) {
            // We are grounded, so recalculate movedirection directly from axes 
            if (Input.GetButton ("Jump")) {
                moveDirection.y = jumpSpeed;
            }
        }
        if(Input.GetKey("w")){
            animation.CrossFade("walk");
        } 
        else {
            animation.CrossFade("idle");
        }

        // Apply gravity
        //moveDirection.y -= gravity * Time.deltaTime;

        // Move the controller

    //  grounded = (flags & CollisionFlags.CollidedBelow) != 0;
    }

    @script RequireComponent(CharacterController)

Here, try this script:

var speed = 1;
var targetRadius = 3;
private var target : Vector3;

function Start () {
    rigidbody.freezeRotation = true;
    target = transform.position;
}

function FixedUpdate () {
    target.y = transform.position.y;
    if (Input.GetButtonDown ("Fire1")) {
        ray = Camera.main.ScreenPointToRay (Input.mousePosition);
        if (Physics.Raycast (ray, hit)) {
            target = hit.point;         
        }
    }   

    if (Vector3.Distance(transform.position, target) > targetRadius) {
            transform.LookAt(target); 
            transform.Translate(0,0,speed);                 
    }
}

It may or may not serve your purposes, but it will move a character to any given point you click. Just make sure it has a rigidbody. Hope this helps!

I made this for you earlier AnaRhisT when you were asking on IRC http://www.squeakycow.com/test/mover.html

I also posted the very simple code to get you started: http://pastie.org/1010140 but received no reply from you. I suggest you start small, instead of copying code from elsewhere and then trying to modify it without knowing how it works. That script should be enough. Havoc seems to have done a good job with his script however, you should probably use that as it's more complete, however please make sure to work through it so that you understand it's functionality, thus, when you modify it you will know what does what. :>

Havoc, this is the modified script.

 var speed = 1;
    var targetRadius = 0;
    private var target : Vector3;
    var hit : RaycastHit; //added
    function Start () {
        rigidbody.freezeRotation = true;
        target = transform.position;
    }

    function FixedUpdate () {
        if (Input.GetButtonDown ("Fire1")) {
            ray = Camera.main.ScreenPointToRay (Input.mousePosition);
            if (Physics.Raycast (ray, hit)) {
            animation.CrossFade("walk"); //added
                target = hit.point;         
            }
        }   

        if (Vector3.Distance(transform.position, target) > targetRadius) {
                transform.LookAt(target); 
            transform.Translate(0,0,speed);
                target.y = transform.position.y;    
        }
    }

rigidbody - just useGravity ticked.