How do i make an item appear somewhere else when clicked?

I am making a game where the player has to find different boxes. When they click the first one, the second one appears and when the second is clicked the third box appears and so on. I made the code and when the first box was clicked, then the second appeared, but when I added the code for the third box, the the box appeared at the third location and skipped the second entirely. If there is a problem with my code or more efficient way, help would be greatly appreciated.
(The box is called blac)

block quote


Is this game similar to time clickers?

Hi @Matthew_Hooper,

Please see my post at Problems with the camera/player in a Parkour Game - #2 by techleapnz - this problem applies to all types of events, including your click events here.

The solution is to have 1 click event, with multiple conditional checks (if/then/else) like you’ve done in your last event.

Hope that helps! Let me know if you have any further questions about this. If this resolves your query, please mark this post as the Solution.

Many thanks,
Geoff @ TechLeap

@Matthew_Hooper You should repeat the group of blocks in the same way instead you did the first one and then you separated the others. Start with a message and then start the various steps.

So the good pratice is as in the aforementioned answer: grab your button, assign the handler, and do your logic in one clicker counter place - An element receives a click event when a pointing device button (such as a mouse’s primary mouse button) is both pressed and released To display or hide while … click, you can add the onclick event listener to

Maybe as an added tip, the move block you use for this is not the best one to use! If there are any obstacles in between, or something else happens, it can make the move not happen. Instead, if you want something to disappear and appear, it is better to use the “set position” codeblock, a bit further down, because that one will definitely have the desired effect!