How to reparent to a new node?

Godot Version

4.2

Question

I’m trying to reparent one node to another, however, the script:

func _ready():
   reparent($NewNode)

…doesn’t seem to work.

What am I doing wrong?

Hi Pauly,

reparent() is a method. You should indicate the method from the node to be rechilded

node_child.reparent(new_node_parent)

Refer to the documentation: