- Edited
I had problems with setting positions on instantiated objects too.
The problem was setting the position while the object wasn't a child of anything.
In snap_block you want to set the position, but the newWall has no parent yet.
I believe the error message !is_inside_tree() shows up only when you try to set global position of unparented objects, but the problem occurs also for setting local positions I guess.
I guess you want to freely position the newWall and when placing it add it as a child to the preview block?
Maybe parent the newWall for placement on the scene tree get_tree().root.add_child(newWall)
(or any other node) and then use reparent($PreviewBlock)
.
Or set position after adding it as child.