# Why is my square growing?

**URL:** https://forum.makecode.com/t/why-is-my-square-growing/27863
**Category:** EV3
**Tags:** game
**Created:** [March 21, 2024, 1:47pm UTC](https://forum.makecode.com/t/why-is-my-square-growing/27863 "2024-03-21T13:47:41Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![TruestLegend](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/truestlegend/32/11965_2.png) [@TruestLegend](https://forum.makecode.com/u/TruestLegend)
#### Post date: [March 21, 2024, 1:47pm UTC](https://forum.makecode.com/t/why-is-my-square-growing/27863/1 "2024-03-21T13:47:41Z")

</div>

I am trying to code flappy bird for the EV3 mindstorms and am trying to make pipes go across the screen, but the pipe is growing while going over the screen, can someone help me?

let scroll = 0  
let pipe = image.create(screen.width, screen.height)  
forever(function () {  
scroll += 5  
brick.showImage(pipe)  
pipe.fill(2)  
pipe.fillRect(scroll, 0, scroll + 15, 75, 1)  
})

---

<div class="post-metadata">

### Author: ![robotosaurus](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/robotosaurus/32/19294_2.png) [@robotosaurus](https://forum.makecode.com/u/robotosaurus)
#### Post date: [March 21, 2024, 5:30pm UTC](https://forum.makecode.com/t/why-is-my-square-growing/27863/2 "2024-03-21T17:30:47Z")

</div>

change the:  
pipe.fillRect(scroll, 0, scroll + 15, 75, 1)  
to:  
pipe.fillRect(scroll, 0, 15, 75, 1)  
why:  
“fillRect” uses “at x,y with w,h” but you used “from x,y to x,y”.

---

<div class="post-metadata">

### Author: ![TruestLegend](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/truestlegend/32/11965_2.png) [@TruestLegend](https://forum.makecode.com/u/TruestLegend)
#### Post date: [March 23, 2024, 12:12am UTC](https://forum.makecode.com/t/why-is-my-square-growing/27863/3 "2024-03-23T00:12:44Z")

</div>

ah Thanks! 🙂

---

<div class="post-metadata">

### Author: ![robotosaurus](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/robotosaurus/32/19294_2.png) [@robotosaurus](https://forum.makecode.com/u/robotosaurus)
#### Post date: [March 23, 2024, 5:14pm UTC](https://forum.makecode.com/t/why-is-my-square-growing/27863/4 "2024-03-23T17:14:31Z")

</div>

Glad I could help, @TruestLegend.

---

<div class="post-metadata">

### Author: ![THEb0nny](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/theb0nny/32/3500_2.png) [@THEb0nny](https://forum.makecode.com/u/THEb0nny)
#### Post date: [May 5, 2024, 3:41am UTC](https://forum.makecode.com/t/why-is-my-square-growing/27863/5 "2024-05-05T03:41:10Z")

</div>

@robotosaurus and how can I display the text?
