I have a problem with this. I'm new here. I just wanted to make a pause screen and then I got a problem with addchild. It doesn't work, but getparent().remove_child(self) works. It successfully removed the child.
Pause script:
func _process():
if Input.is_action_just_pressed("ui_accept"):
get_parent().remove_child(self)
var options = load("res://options.tscn").instance()
add_child(options)