How to show/hide a Patch9Frame

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By GunPoint
:warning: Old Version Published before Godot 3 was released.

So, i have like a panel (patch9frame) which shows when the player enters an area
I want to control it from another script so i used get_node(path)
I accesed it with .and i wrote the show()keyword
Like get_node(path).show()
But i got an error
“Attempt to call function ‘show’ in base ‘null instance’ on a null instance.”
Is there any other way i can show/hide a patch9frame?

:bust_in_silhouette: Reply From: Skyfrit

Try get_node(“path”).show()

tried, doesn’t work
error :“Attempt to call function ‘show’ in base ‘null instance’ on a null instance.”

GunPoint | 2017-11-07 13:58

Then like Zylann said your node path is incorrect.

Here are some example from the documentation.
Node — Godot Engine (stable) documentation in English

You also can right click the node and select Copy Node Path, and paste it in your script.

enter image description here

Skyfrit | 2017-11-07 18:59

:bust_in_silhouette: Reply From: Zylann

Also make sure your node path is correct. If you are unsure about an error in the debugger, have a look at the system console too, it sometimes contains more info :wink:

In the system console:
ERROR: Node not found: Player
In the debugger:
Node not found: Player

GunPoint | 2017-11-07 17:19

Yup, so the path is wrong, fix it :stuck_out_tongue:

Zylann | 2017-11-07 19:03