Transform Position Are Different Each Other

Hey guy, I have a problem here. So, I’m working in my 2D game, and let’s say I have two game object. But, the position of the game object doesn’t match. For example, I set the first game object transform.position to 10f, 10f, 10f and I did the same thing with the second game object, the position is 10f, 10f, 10f. But, the game object are not in the same place. Please help me, I really need to make the position match each other.

And well, I use the canvas too for making the game responsive. Is it the case why this is happening?

Good day.

This is because the position you see in the inspector is the local position, relative to its parent object. You have two objects from different parents.

Bye!