Enemy Patrol Script Problems

The enemy whom this script is attached to will not move. Instead he just has a horrific seizure. I’m sorry but for me to try to put this problem to words would only confuse the issue further. If someone could please test this script, and solve this problem it would be greatly appreciated.
Thanks!

2213456–147217–WayPoint.cs (877 Bytes)

usually easier to just paste the code in using [code ][/code ] tags… I’ve commented a couple of lines

using UnityEngine;
using System.Collections;

public class WayPoint : MonoBehaviour {

    public Transform[] Waypoints; 
    public float Speed;
    public int curWayPoint;
    public bool doPatrol = true;
    public Vector3 Target;
    public Vector3 MoveDirection;
    public Vector3 Velocity;

    void Update()
    {
        Debug.Log (curWayPoint);
        Debug.Log (Velocity);
        if(curWayPoint < Waypoints.Length)
        {
           Target = Waypoints[curWayPoint].position;
            //MoveDirection = Target - Waypoints[curWayPoint].position; // target - target = 000
            MoveDirection = Target - transform.position; // target - myposition => direction to head in
            Velocity = GetComponent<Rigidbody>().velocity;

            if(MoveDirection.magnitude < 1)
            {
                curWayPoint++;
            }
            else
            {
                Velocity = MoveDirection.normalized * Speed;
            }
        }
        else
        {
            if(doPatrol)
            {
                curWayPoint=0;
        }
            else
            {
                Velocity = Vector3.zero;
            }
            }
        GetComponent<Rigidbody>().velocity = Velocity;
        transform.LookAt(Target);
}
}