Issues While De Parenting it.

Well i am experiencing issues while de parenting the child after making its parent. i have a humanoid body and while animating i assign a point on its right foot. by making the point child to that right foot. i stop animation in middle and then unparent the point which was exactly moving along the right foot. After un parenting it changes the position of the point.

point moving with right foot

9392606--1314134--MovingWithFoot.PNG 9392606--1314137--Changed.PNG

after unparenting the right foot

here how its changed the position .

Any Solutions?

   RightLegPoint.transform.SetParent(mainIK.references.rightFoot);
   RightLegPoint.transform.localPosition=Vector3.zero;
   yield return new WaitForSeconds(1f);
   RightLegPoint.transform.SetParent(null,true);

Well i have tried that too same results

Well issue is resolved. because Final IK component it fixes the position.