# Code not working

**URL:** <https://forum.code.org/t/code-not-working/36016>\
**Category:** Coding and Debugging Help\
**Created:** [March 15, 2022, 1:19pm UTC](https://forum.code.org/t/code-not-working/36016 "2022-03-15T13:19:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sherry.wood](https://avatars.discourse-cdn.com/v4/letter/s/d78d45/32.png) [@sherry.wood](https://forum.code.org/u/sherry.wood)\
**Post date:** [March 15, 2022, 1:19pm UTC](https://forum.code.org/t/code-not-working/36016/1 "2022-03-15T13:19:33Z")

</div>

[Posts in the debugging category need to have the following pieces of information included in order to help other teachers or our moderator team best help you. Feel free to delete everything in brackets before posting your request for debugging help.]

> **[Check out what I made](https://studio.code.org/projects/gamelab/1qnrJscRLIrrLCuBRH2MR3QuRFJueENaZRgtIlzb0Sc)**
>
> I wrote the code myself with Code.org

I expect scary to disappear after 15 seconds

---

<div class="post-metadata">

**Author:** ![CeciliaZ](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/ceciliaz/32/7000_2.png) [@CeciliaZ](https://forum.code.org/u/CeciliaZ)\
**Post date:** [March 15, 2022, 10:30pm UTC](https://forum.code.org/t/code-not-working/36016/2 "2022-03-15T22:30:02Z")

</div>

Hello,  
The way the code is written when the cake is clicked, the count goes up. The variable count does not count seconds. It starts at 0, where it is declared, and will go up each time the cake is clicked (because of the if statement).

When scary appears, if you keep clicking where the cake is, even though it is not visible, scary will disappear. Does that make sense?

If you’d like to code a timer so it does disappear after 15 seconds that is a little more complicated. Let me know if you’d like to know more about that.  
~Cecilia

---

<div class="post-metadata">

**Author:** ![CeciliaZ](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/ceciliaz/32/7000_2.png) [@CeciliaZ](https://forum.code.org/u/CeciliaZ)\
**Post date:** [March 15, 2022, 10:43pm UTC](https://forum.code.org/t/code-not-working/36016/3 "2022-03-15T22:43:36Z")

</div>

In addition, MousePressedOver might not be the block you want to use in the if statement. It might be though, you only need to click the cake area 4 or 5 times before scary disappears.

To see explanations and examples of how each block works, hover over the block in the toolbox section and then click on the bubble that appears for the info about that block.
