Switch the hide/show

I want the object to appear and disappear by pressing the same button.
How can I do this?

Because there’s no If…then…else in GDevelop, you have to use variables to achieve the same result :

1 Like

I perform it like your solution. But it still not work.

You did not match his solution (you’re missing some actions from MrMen’s screenshot), but generally I would recommend you learn about toggles via variables in general, here’s some details:

1 Like

Thanks. Before I didn’t know anything about subevents. You did really help me.