Simple!!!
// You'll need to set this either within the script or within the inspector.
GameObject gameObjectToMove;
public void MoveGameObject()
{
gameObjectToMove.transform.position = new Vector3(x, y, z);
}
Using “transform.position” by itself is short for saying “this.transform.position”, in which case you’re simply referring to the game-object that the script is attached to.