How to make FPS follow the moving object?

for example player sit down on the ship and follow the ship movement. by the way, I added ship collider on it, so i have added smooth follow script to FPS and set my ship as the target. however, the player is still moving outside the ship, which is not what i want. what i want is when player within/inside the ship, player is not able walking out of the ship and it does follow the ship movement.

here is the script that i have got for ship movement:

var pointB : Transform;
private var pointA : Vector3;
var speed = 1.0;

function Start () {
    pointA = transform.position;
    while (true) {
        var i = Mathf.PingPong(Time.time * speed, 1);
        transform.position = Vector3.Lerp(pointA, pointB.position, i);
        yield;
    }
}

i created a cube as my pointB target in this script.

If you want the game to turn out really good, you can download a PDF file on the unity website. That would help you alot because I have used some of the tutorials and they are really specific.

Hope it all turns out well.

-technor