# How do you make a sprite stay on another?

**URL:** <https://forum.makecode.com/t/how-do-you-make-a-sprite-stay-on-another/2579>\
**Category:** Help\
**Created:** [June 29, 2020, 7:23pm UTC](https://forum.makecode.com/t/how-do-you-make-a-sprite-stay-on-another/2579 "2020-06-29T19:23:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![GameGod](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gamegod/32/2756_2.png) [@GameGod](https://forum.makecode.com/u/GameGod)\
**Post date:** [June 29, 2020, 7:23pm UTC](https://forum.makecode.com/t/how-do-you-make-a-sprite-stay-on-another/2579/1 "2020-06-29T19:23:03Z")

</div>

> **[SpinWheel](https://arcade.makecode.com/35814-32700-48832-62099)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

This is a new one-button blocks game I am working on. I want to stop the “Jumpee” sprite from sliding off the platforms. How should I do this?

(Extension by [felixtsu](https://forum.makecode.com/u/felixtsu))

(This is kind of like the first part of [slope-physics-demo](https://arcade.makecode.com/02010-81708-94018-17320) by [richard](https://forum.makecode.com/u/richard). How did he do it?)

Also, A is to jump. Sometimes when the player lands on a platform, he is not able to jump anymore. How do I fix this?

---

<div class="post-metadata">

**Author:** ![felixtsu](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/felixtsu/32/12024_2.png) [@felixtsu](https://forum.makecode.com/u/felixtsu)\
**Post date:** [June 30, 2020, 12:36am UTC](https://forum.makecode.com/t/how-do-you-make-a-sprite-stay-on-another/2579/2 "2020-06-30T00:36:28Z")

</div>

Great game!

> **[StickyExample](https://arcade.makecode.com/98533-33382-97857-91036)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

To be sticky it means when ‘Jumpee’ is on a platform, it gains the same vy of the platform, and 0 ay.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/7/792c3f1f5f1657f7aae2b97b93dceb7bcc979489.png)

Whether having the same vx, or some proportion of it is up to you, say vx=0 means no friction while same vx mean totally sticky.

---

<div class="post-metadata">

**Author:** ![GameGod](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gamegod/32/2756_2.png) [@GameGod](https://forum.makecode.com/u/GameGod)\
**Post date:** [June 30, 2020, 2:28pm UTC](https://forum.makecode.com/t/how-do-you-make-a-sprite-stay-on-another/2579/3 "2020-06-30T14:28:30Z")

</div>

Thanks! This really helps! 😀  
Although, I’m still having problems.

---

<div class="post-metadata">

**Author:** ![Starfox2k](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@Starfox2k](https://forum.makecode.com/u/Starfox2k)\
**Post date:** [June 3, 2022, 4:38pm UTC](https://forum.makecode.com/t/how-do-you-make-a-sprite-stay-on-another/2579/4 "2022-06-03T16:38:07Z")

</div>

I have been playing with this concept too and I think i fixed it. Check it out.

 ![code](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/b/b4fdf61a5719e1a36b8bcb99457389f9d3cfd777.png)
