# Moving text in Game Lab

**URL:** <https://forum.code.org/t/moving-text-in-game-lab/37980>\
**Category:** CS Discoveries\
**Tags:** csd-unit-3\
**Created:** [April 13, 2023, 4:38pm UTC](https://forum.code.org/t/moving-text-in-game-lab/37980 "2023-04-13T16:38:30Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![pluto](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/pluto/32/9141_2.png) [@pluto](https://forum.code.org/u/pluto)\
**Post date:** [April 13, 2023, 5:59pm UTC](https://forum.code.org/t/moving-text-in-game-lab/37980/3 "2023-04-13T17:59:03Z")

</div>

Good Afternoon @langilla1,

I will give you clear instructions of how to achieve this goal.

* * *

#1. Create a variable named anything, for my case I will use x.  
`var x; `

#2. Assign the variable  
`var x = 0;`

#3. In a loop (preferably the draw loop), add an increment operator or just use the method mentioned below.

```auto
//i will use addition for mine. remember you can do any operation depending on what you want
x++;
//or you can use
x += 1 //if you do not know, this is the same as x = x + 1

```

#4. Then in the text syntax, put your variable in the x or y  
`text("Hello world!", x, 200)`

* * *

I hope this had helped!

---

_[View the full topic](https://forum.code.org/t/moving-text-in-game-lab/37980)._
