I'm making a game where I switch scenes every so often. I need variables to safe between these scenes so I made a global singleton named: "global.gd". This is the code:
extends Node
var money = 1
var lives = 3
The problem is that every time I switch scenes the amount is reseted to 1 and 3. So even if I change the amount during a round, when I switch to another scene it just goes back.
What am I doing wrong?