save scene and instances with instances' children

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

i’m trying to make a game, you can place stuff down by clicking (using add_children)

when saving i pack the main scene and save in a new tscn
when i load it back i get an error when updating one of the saved instances’ children via an attached script

i checked, and apparently when loading from a packed scene all the instances’ children get removed when loading

how can i save a scene, its instanced children and the children from said instances?

:bust_in_silhouette: Reply From: Inces

You need to set owner property of children nodes. Set it to the root of your saved scene