Child is following parent's position wrong

I’ve googled this over and over again and can’t find the solution. So I have a little character follow the player around like Navi from Zelda. I code the follower in the parent’s control code by declaring the follower object and its transform and use this to move it:

void Seed()
    {
        //SEED MOVEMENT
        Vector3 seedPos = new Vector3(0, 0, 0);                                   //Initialize seedPos

        seedTimer += Time.deltaTime;                                                 //Increase seed movement timer over time

        if (seedTimer > seedMove)                                                      //If seed timer is at the end length of time
        {
            seedXTo = Random.Range(-1.5f, 1.5f);                             //Set x position of seed to move towards
            seedYTo = Random.Range(0.5f, 1.5f);                               //Set y position of seed to move towards

            seedTimer = 0;                                                                                                  //Resets the seed movement timer
        }

        seedPos = new Vector3(seedXTo, seedYTo, 0);                                                                         //Places new x and y position into a Vector3

        seedTrans.position = Vector3.Lerp(seedTrans.position, seedPos, 3 * Time.deltaTime);                                 //Smoothly move towards x and y position
}

No matter what I do, when I change direction with the player (When I change direction I code it’s localScale to be -1 when moving left and 1 when moving right) and when I do it multiplies the x value of the parent scale by the childs x transform, so when I change direction it jerks to it’s negative x and moves toward the seedXTo and seedYTo. I’ve tried Mathf.Abs, localPosition vs position and nothing works. Help!

A child gameobject’s position, rotation, and scale values are all relative to its parent. If you change the parent’s values, the child’s world position will implicitly change. That’s got nothing to do with your movement code for the child.

It sounds like you want some aspects of the parent to automatically carry into the child (like position) but certain other elements to be ignored (like scale). The easiest way to do this is probably to split the “parent” into two pieces: an invisible container and a visible player. Make the visible player and your follower character both children of the container.

When you want something (like position) to apply to both the player and the follower, modify the container.

When you want something to apply only to the player and not to the follower (like inverting the X scale), modify the child player object instead.