# "Score" Help please.

**URL:** https://discussions.unity.com/t/score-help-please/562877
**Category:** Scripting
**Tags:** Scripting
**Created:** [January 9, 2015, 12:19pm UTC](https://discussions.unity.com/t/score-help-please/562877 "2015-01-09T12:19:01Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![AppleJuicy](https://avatars.discourse-cdn.com/v4/letter/a/9de0a6/32.png) [@AppleJuicy](https://discussions.unity.com/u/AppleJuicy)
#### Post date: [January 9, 2015, 12:19pm UTC](https://discussions.unity.com/t/score-help-please/562877/1 "2015-01-09T12:19:01Z")

</div>

Hi all programmer out there. I having trouble getting of Score using GUIText. i am doing a 2d top-down game. i have my “player” destroyed a “cash” object. however, i need to gain some figures from destroying the cash by using GUIText, but i couldnt get it. can someone help? Thanks in adv!

---

<div class="post-metadata">

### Author: ![fire7side](https://avatars.discourse-cdn.com/v4/letter/f/a88e57/32.png) [@fire7side](https://discussions.unity.com/u/fire7side)
#### Post date: [January 9, 2015, 1:29pm UTC](https://discussions.unity.com/t/score-help-please/562877/2 "2015-01-09T13:29:54Z")

</div>

[http://unity3d.com/learn/tutorials/modules/beginner/ui/ui-text](http://unity3d.com/learn/tutorials/modules/beginner/ui/ui-text)

---

<div class="post-metadata">

### Author: ![Kurt-Dekker](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/kurt-dekker/32/101578_2.png) [@Kurt-Dekker](https://discussions.unity.com/u/Kurt-Dekker)
#### Post date: [January 9, 2015, 4:45pm UTC](https://discussions.unity.com/t/score-help-please/562877/3 "2015-01-09T16:45:00Z")

</div>

The Unity3D way is to make a public GUIText member variable on your script, use the Unity editor to fill that value in with the GUIText you have set up for displaying the score, and then when you are ready to display the score, do something like this:

```auto
guiTextReference.text = System.String.Format( "Score: {0}", currentScore);

```

---

<div class="post-metadata">

### Author: ![PGJ1](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/pgj1/32/316216_2.png) [@PGJ1](https://discussions.unity.com/u/PGJ1)
#### Post date: [January 9, 2015, 5:22pm UTC](https://discussions.unity.com/t/score-help-please/562877/4 "2015-01-09T17:22:52Z")

</div>

Since Unity 4.6 there is a new GUI system, which makes GUIText somewhat obsolete. So, you probably want to look into the new GUI instead. Here is some info about the new Text class: [http://docs.unity3d.com/ScriptReference/UI.Text.html](http://docs.unity3d.com/ScriptReference/UI.Text.html)
