I have deleted all the children of the node, how do I add them again?
func _physics_process(delta):
if Input.is_action_just_pressed("ui_accept"):
for i in get_children():
remove_child(i)
if Input.is_action_just_pressed("ui_cancel"):
for i in get_children():
add_child(i)
this code makes that when pressing a key I delete them and when pressing another attempt they return but it does not work