Upgrade button changing stat

Godot Version



I wanted to make an upgrade menu for my game, and I tried getting started, but I’m not sure what to do. if anyone could link a video or give a code to grab the value of something and change it.
I just want to change the health and the damage. I need to get the damage and health variables from a component on a tscn.
I looked for ideas on YouTube and there were only rouge like menu ones, and I could try that, I guess, but what I want to do is simply change the value of a variable on a different scene with the click of a button.

If that other scene is not loaded then you cannot reach it. If it is, then you’ll have a variable referring to it. Use that variable to reach the properties of that other scene.

This all depends on your actual situation. Maybe post more context.