# Velocity and Acceleration Code Blocks

**URL:** <https://forum.makecode.com/t/velocity-and-acceleration-code-blocks/15317>\
**Category:** Help\
**Created:** [September 12, 2022, 1:39pm UTC](https://forum.makecode.com/t/velocity-and-acceleration-code-blocks/15317 "2022-09-12T13:39:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cats\_rule\_the\_web](https://avatars.discourse-cdn.com/v4/letter/c/f08c70/32.png) [@cats\_rule\_the\_web](https://forum.makecode.com/u/cats_rule_the_web)\
**Post date:** [September 12, 2022, 1:39pm UTC](https://forum.makecode.com/t/velocity-and-acceleration-code-blocks/15317/1 "2022-09-12T13:39:06Z")

</div>

Hi so I was making a game for a task at school and I want it so that the velocity and acceleration changes after a certain level. I tried doing this but it didn’t work. Also we are doing this in block code format. Thanks 🙂

 ![Screen Shot 2022-09-12 at 4.25.38 pm](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/8/83f4e96307a1fb1885319b7be32e169eb4227a52.png)

---

<div class="post-metadata">

**Author:** ![jackal](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jackal/32/19506_2.png) [@jackal](https://forum.makecode.com/u/jackal)\
**Post date:** [September 13, 2022, 3:20pm UTC](https://forum.makecode.com/t/velocity-and-acceleration-code-blocks/15317/2 "2022-09-13T15:20:50Z")

</div>

You’ll have to put the if, then block in the function, then it will work.

---

<div class="post-metadata">

**Author:** ![SOCKMONSTER12](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/sockmonster12/32/7584_2.png) [@SOCKMONSTER12](https://forum.makecode.com/u/SOCKMONSTER12)\
**Post date:** [March 15, 2023, 12:49am UTC](https://forum.makecode.com/t/velocity-and-acceleration-code-blocks/15317/3 "2023-03-15T00:49:05Z")

</div>

take out the ay(acceleration) block an d add it to the on start.
