another rotating question

I have figured out how to rotate an object around my main character upon colliding, however now all the rotating object does is stay at the “feet” of my character and run into other objects, usually stalling the game or causing multiple other issues that are quite comical. I am trying to figure a way that after the object has changed parents and begins to rotate, that the object that is rotating begins to climb up the y-axis of the parent. I am wanting to do this so that it will rotate for a certain amount of time then be destroyed from the game. exp (power up object is picked up from ground, going up the y axis rotates 2 -5 times then is destroyed).

Any help or put me on the right path.

Thanks.

Dan.

Here is what I have right now I have frozen the rigidbody on all but the y-axis, but when it reaches the “end” instead of heading back down it just floats off into space. This may work for what I am trying to do, but would prefer it to head back down. Any help?

1{

2	[SerializeField]
	Transform platforms; 

3	[SerializeField]
	Transform startTransform;

4	[SerializeField]
	Transform endTransform;

5	[SerializeField]
	float platformSpeed;

6	Vector3 direction;
7	Transform destination; 

8	void Start ()

	{

9		SetDestination(startTransform);

	}

10	void FixedUpdate()

	{

11		platforms.GetComponent<Rigidbody>().MovePosition(platforms.position + direction * platformSpeed *Time.fixedDeltaTime);

12		if (Vector3.Distance (platforms.position, destination.position) < platformSpeed * Time.fixedDeltaTime);

		{

13			SetDestination(destination == startTransform ? endTransform : startTransform);

		}

	}

14	void OnDrawGizmos() 

	{
15		Gizmos.color = Color.green;
16		Gizmos.DrawWireCube(startTransform.position, platforms.localScale);

17		Gizmos.color = Color.red;
18		Gizmos.DrawWireCube(endTransform.position, platforms.localScale);

	}

19	void SetDestination(Transform dest)

	{

20		destination = dest;
21		direction = (destination.position = platforms.position).normalized;

	}

}