|Topic was automatically imported from the old Question2Answer platform.
Hi (I am a newbie and wasn’t sure how to add images here so if they won’t show properly I added links to my drive)
I created Panels with shared script and attached different sprites as child nodes to each one:
I wrote the code to make the Panels react to where the mouse drags/drops them (alongside with their sprites).
Afterwards I also added Area2D to the scene.
My goal is to make the player drag a panel to this Area2D and when that happens, the visibility of this specific panel (and its child nodes) should turn to false.
Here is what I tried:
But this is what keeps happeniing when I run the game:
I know the problem is in the line
Panel.visible = false
But I don’t know how to write it correctly.
I will be happy for any help.