# Variables in Blocks

**URL:** https://forum.makecode.com/t/variables-in-blocks/4786
**Category:** PXT
**Created:** [December 3, 2020, 10:03pm UTC](https://forum.makecode.com/t/variables-in-blocks/4786 "2020-12-03T22:03:15Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![supershook](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@supershook](https://forum.makecode.com/u/supershook)
#### Post date: [December 3, 2020, 10:03pm UTC](https://forum.makecode.com/t/variables-in-blocks/4786/1 "2020-12-03T22:03:15Z")

</div>

I’ve been trying to place variables inside a block so they would appear with the functions but I’m not sure how to get it to work. Can anyone help me out?

---

<div class="post-metadata">

### Author: ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)
#### Post date: [December 3, 2020, 10:37pm UTC](https://forum.makecode.com/t/variables-in-blocks/4786/2 "2020-12-03T22:37:46Z")

</div>

Welcome, @supershook!

Can you explain what you are trying to attempt more clearly? Are you trying to make local variables? Or are you trying to have parameters to your functions?

---

<div class="post-metadata">

### Author: ![supershook](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@supershook](https://forum.makecode.com/u/supershook)
#### Post date: [December 3, 2020, 11:22pm UTC](https://forum.makecode.com/t/variables-in-blocks/4786/3 "2020-12-03T23:22:00Z")

</div>

I’m trying to make local variables that can be dragged into the workspace for various uses. Is that something that can be done?

---

<div class="post-metadata">

### Author: ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)
#### Post date: [December 4, 2020, 12:06am UTC](https://forum.makecode.com/t/variables-in-blocks/4786/4 "2020-12-04T00:06:03Z")

</div>

Sadly, local variables can’t be created by the user yet.

---

<div class="post-metadata">

### Author: ![supershook](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@supershook](https://forum.makecode.com/u/supershook)
#### Post date: [December 4, 2020, 7:55pm UTC](https://forum.makecode.com/t/variables-in-blocks/4786/5 "2020-12-04T19:55:53Z")

</div>

okay, thanks for letting me know!
