# UI Text error

**URL:** https://discussions.unity.com/t/ui-text-error/171612
**Category:** Questions & Answers
**Created:** [August 24, 2016, 9:15am UTC](https://discussions.unity.com/t/ui-text-error/171612 "2016-08-24T09:15:51Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![EroticFlower](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@EroticFlower](https://discussions.unity.com/u/EroticFlower)
#### Post date: [August 24, 2016, 9:15am UTC](https://discussions.unity.com/t/ui-text-error/171612/1 "2016-08-24T09:15:51Z")

</div>

**This is the error:**

Assets/Scripts/Playercontroller.cs(38,27): error CS1061: Type `UnityEngine.UI.Text' does not contain a definition for `Text’ and no extension method `Text' of type `UnityEngine.UI.Text’ could be found (are you missing a using directive or an assembly reference?)

**This is my code:**

```
using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class Playercontroller : MonoBehaviour {

	public Text countText;
	public float speed;

	private int count;
	private Rigidbody rb;

	void Start () 
	{
		rb = GetComponent<Rigidbody> ();
		count = 0;
		SetCountText ();

	}

			void FixedUpdate()
			{
					float moveHorizontal = Input.GetAxis ("Horizontal");
					float moveVertical = Input.GetAxis ("Vertical");
					Vector3 movement = new Vector3 (moveHorizontal,0.0f,moveVertical);
					rb.AddForce (movement * speed);
				}
						void OnTriggerEnter(Collider other) 
				{
							if (other.gameObject.CompareTag("Pickup"))
				{
								other.gameObject.SetActive(false);
								count = count + 1;
								SetCountText ();
				}
			}
			void SetCountText()
		{
		countText.Text = "Count: " + count.ToString ();
	}
}

```

---

<div class="post-metadata">

### Author: ![\_Yash](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/_yash/32/97570_2.png) [@\_Yash](https://discussions.unity.com/u/_Yash)
#### Post date: [August 24, 2016, 9:15am UTC](https://discussions.unity.com/t/ui-text-error/171612/2 "2016-08-24T09:15:41Z")

</div>

change `countText.Text = "Count: " + count.ToString ();` with `countText.text = "Count: " + count.ToString ();`

its just a typo,
