How to reset control node UI while switching scene's

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Nirmal

Hey how do i reset control node while switching scene’s
like from gameover scene to World scene
In my project when my player hp reaches 0 it switches to gameover scene then when i press restart button with get_tree().change_scene("res://Node2D.tscn") this simple code
it changes scene, But My playerhp is still in 0
setters is used for playerhp, any solution?

:bust_in_silhouette: Reply From: deaton64

Hi,
have playerhp as a global variable.