Game Objects same transform.position value, sitting on different places

So in my game, I have a bunch of parent gameobjects which I’m trying to move via script, they are instantiated and start moving to their final position which is x: 0 y: -6. The issue is, every parent object which is being moved goes to a different place when I set their transform to y: -6. I added a screenshot so it gets clearer.

I’m not an expert but I believe that this is caused because these gameobjects have children, so it changes their transform positions in a way I can’t understand, is there any way that I can access a “global” position and move the gameobjects towards it? My current script responsible for moving the bricks:

public class MoveBrickSc : MonoBehaviour

    WavesScript waveSc;
    GameObject finalPosObj;
    Vector3 finalPos;
    float speed;

    // Start is called before the first frame update
    void Start()
        waveSc = GameObject.FindObjectOfType<WavesScript>();

        finalPosObj = GameObject.Find("FinalPos");

        finalPos = finalPosObj.gameObject.transform.position;
        speed = waveSc.moveSpeed;

    // Update is called once per frame
    void Update()
        transform.position = Vector3.MoveTowards (transform.position, finalPos, speed * Time.deltaTime);

We don’t see your gizmo editor setting. Make sure you have it set to “pivot” and not to “center”. Keep in mind that the position of your gameobject is always relative to the pivot.

Also note that you grab the position of your “FinalPos” gameobject in Start. If the position changes afterwards it won’t affect your position stored in the variable “finalPos”.

We can’t really say much more about your issue since a lot details are missing which only you can check in your project.

use transform.localposition instead of transform.positon

let me know if that fix it