Childing an instanced scene?

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

Hello again! I was wondering if it were possible to move a instanced scene to the child of another scene. I get the error that the child already has a parent. The reason I want to do this is so that the player can “carry” an object which has specific variables set. if that is not the proper way to implement that I would be happy to hear another way. Thanks.

:bust_in_silhouette: Reply From: Hooni

I hacked my way through with something like this:

if node.get_parent():
    node.get_parent().remove_child()
add_child(node)

If I remember correct that worked, it sure is uggly…
On mobile and cant seem to make it pretty and underscores arr removed…

edited codes looks better. :slight_smile:

volzhs | 2017-01-15 18:09

Ty. I suck with my mobile.

Hooni | 2017-01-15 21:58