add a global variable called "visible" and set its value to 0
Event
Mouse -> on object clicked -> anothersprite
System -> compare variable -> visible =0
Action
yoursprite -> set visible -> invisible
system -> set value -> visible=1
Event
Mouse -> on object clicked -> anothersprite
System -> compare variable -> visible =1
Action
yoursprite -> set visible -> visible
system -> set value -> visible=0