# The hit-immunity won't work

**URL:** <https://forum.makecode.com/t/the-hit-immunity-wont-work/16450>\
**Category:** Help\
**Created:** [November 21, 2022, 5:46pm UTC](https://forum.makecode.com/t/the-hit-immunity-wont-work/16450 "2022-11-21T17:46:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/kan/32/7193_2.png) [@Kan](https://forum.makecode.com/u/Kan)\
**Post date:** [November 21, 2022, 5:46pm UTC](https://forum.makecode.com/t/the-hit-immunity-wont-work/16450/1 "2022-11-21T17:46:04Z")

</div>

I’m trying to make it so that after you get hit you get a hit immunity for a few seconds. To do that I’m changing the sprite image and making it detect it which type of sprite image it is to either make the player take damage or not. I tried to make something how I thought it would work but it doesn’t work. Anyone know anything?

> **[Survival game](https://arcade.makecode.com/43161-31646-31279-20983)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![isoffline](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/isoffline/32/8791_2.png) [@isoffline](https://forum.makecode.com/u/isoffline)\
**Post date:** [November 21, 2022, 7:08pm UTC](https://forum.makecode.com/t/the-hit-immunity-wont-work/16450/2 "2022-11-21T19:08:47Z")

</div>

you cnage the sprite kind then pause for a few seconds and change it back to the player kind again
