How to get the Parent Node with a instance scene

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Newby

i instanced a scene into my main scene and i want it to access the parent node my main scene with my instanced scene.
How can i do that

1 Like
:bust_in_silhouette: Reply From: kidscancode

You can use get_parent() for this.

However, note that this will cause a problem if you run the scene by itself, because it won’t have a parent. For that reason, it’s usually a good idea to avoid referencing a parent and use signals instead when you need to communicate “up” the tree. But that’s another topic… :slight_smile:

1 Like