Hello. I am trying to connect a finish flag(switch scene to menu when the player body enters) to my menu. I am using a signal to connect. I am unable to connect the normal way due to them being in a different scene. How should I do this?
My code for switching scene and emitting the signal:
func _on_Area2D_body_entered(body: Node) -> void:
get_tree().change_scene("res://Menu.tscn")
emit_signal("finish")