waypoints problem

#pragma strict
var WayPoints : Transform;
var speed : float = 20;
function Start () {

}

function Update () {
var target : Vector3 = WayPoints.position;
var moveDirection : Vector3 = target - transform.position;

var velocity = rigidbody.velocity;
if(moveDirection.magnitude < 1){
velocity = Vector3.zero;
}
else{
velocity = moveDirection.Normalize * speed;
}
rigidbody.velocity = velocity;
}

i have this error and idont know how to fix it

Operator ‘*’ cannot be used with a left hand side of type function(UnityEngine.Vector3)

It’s

velocity = moveDirection.normalized * speed;

or

moveDirection.Normalize();
velocity = moveDirection * speed;

but not

velocity = moveDirection.Normalize * speed;