After Capsule Collision, change into another object.

So I have a series of Capsules that are Rigidbodied with gravity and fall from a space ship in the sky. When they hit the Terrain (Or any other object with a collider) I want them to immediately change into a robot (robo2) how could this be scripted? Thanks!

var robot : Transform; // set this as the robot

function OnCollisionEnter()
{
Instantiate(robot,transform.position,Quaternion.identity); //instantiate robot
Destroy(gameObject); // destroy capsule
}