i need help on a way to store the current root node of my levels so that my gameover screen (which is a seperate scene) can restart which ever level the player is in.
my gameover script
extends Control
func onButtonpressed():
gettree().change_scene("res://Scenes/WorldManager.tscn")
my player script (the part which calls in the gameover scene)
if health <=0:
get_tree().change_scene("res://Scenes/Deathscreen.tscn")
level 1 and 2's node hierachy
https://imgur.com/a/XB8S2Bs