Facing moving direction using Waypoints

I'm using the following waypoint system but I am unable to get the characters to face the direction the are moving in. Can anyone be of assistance in telling me how to do so?

var Waypoint : Transform[];
var speed : int = 20;
private var currentWP : int;
var loop : boolean = true;

function Update() {
if(currentWP < Waypoint.length){
var target = Waypoint[currentWP].position;
var moveDirection : Vector3 = target - transform.position;

var velocity = rigidbody.velocity;

if (moveDirection.magnitude < 1){
currentWP++;
}
else {
velocity = moveDirection.normalized * speed;
}
}
else{
if(loop){
currentWP=0;
}
else{
velocity = Vector3.zero;
}
}
rigidbody.velocity = velocity;

}

@script RequireComponent(Rigidbody)

It looks like scripting a rigidbody is worthless to your code; if you actually need a rigidbody, then use forces. Use Transform.LookAt(waypoints[currentWaypointIndex]), and apply relative force in the Z direction.

(waypoints should be lowercase and currentWaypointIndex is more descriptive of the variable.)