Are you sure you are accessing the same variable in these different scripts? The variables you declare in a script are local to it even if they share the same name as variables used in other scripts. A common way to share access to a variable is to declare it in an Autoload Singleton script. The variable can then be accessed in other scripts using the Singleton's name . variable name. For example, if your variable was p and your Singleton was called Global you would reference the variable as Global.p
#Variable keeps resetting, PLEASE HELP
2 messages · Page 1 of 1 (latest)
Here's the reference for how to setup singletons:
https://docs.godotengine.org/en/stable/tutorials/scripting/singletons_autoload.html
Godot Engine documentation
Introduction: Godot's scene system, while powerful and flexible, has a drawback: there is no method for storing information (e.g. a player's score or inventory) that is needed by more than one scen...