Disabling child scaling, when parent scales with Math
I'm not very familiar with Unity3D, but are you absolutely 100% certain that transform.parent.localScale will never be 0? Otherwise, you should check for that before dividing.