I will change a scene on button click. But not change the main scene with button.
Node structure: main
scene (with childs)
button
func pressed(): get_node("scene").change_scene("res://second_scene.tscn")
main
- scene (with childs)
- button
button.gd:
func pressed():
get_node("scene").change_scene("res://second_scene.tscn")
It doesn't works.