Moving a Text object in script

Hello everyone,
In my current project, I have 3 Text Objects. After a certain condition, I want to move one of them to a new position. This should be very simple, but for some reason, after this condition and I try to move the Text Object, it winds up going to an extremely random position that is out of the scene view.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class AssignManagerScript : MonoBehaviour {

	public Text assign_text_1;
	public Text assign_text_2;
	public Text assign_text_3;

	

	// Use this for initialization
	void Awake () {

		assign_text_2.enabled = false;
		assign_text_3.enabled = false;
		
		
	}
	
	// Update is called once per frame
	void Update () {
			
			if(ManagerScript.total_attacks > 10){

				Vector3 pos = assign_text_1.transform.position;
				pos.x = -282;
				assign_text_1.transform.position = pos;
			}
				
	}
}

Can anyone tell me what I am doing wrong? Thanks very much in advance.

Text objects don’t use the standard transform, they use a RectTransform. Try getting that and modifying it instead of the root transform object for better results.