character model squeezes in moving platform.

I have managed to create a moving platform with my character becoming it’s child, which results the character moving with it. Quiet a good solution. However, This leads to a problem which makes my character model F’up. Actually, my player model get’s slim his capsule collider get’s stretched out and the model gets slimed, like he is packed. I have looked at other ways to add moving platform but i couldn’t understand them. This one is very simple. Here is the script i use.
Please help me
THank you.

function OnTriggerEnter (other :
Collider) { other.transform.parent
= gameObject.transform; } function OnTriggerExit (other :
Collider) { other.transform.parent
= null; }

I think the reason your character is changing its shape is because the scale of the platform he is standing on, isn’t 1,1,1.

so when you make the platform his parent, your character changes his scale to fit the scale of the object he is parented to.

I have solved it. I had to Create an empty object and adding the Unity animation or any animation to it. Then add child to this empty object and those child are the model and the trigger.

In the Hierarcy it looks like this

   > EmptObject (name it anything you want)
          The model (which is moving)
          The tigger (which has the code)

So the model & the trigger are the children’s on the empty object not each other.
Any questions ask