#Variable keeps resetting, PLEASE HELP

2 messages · Page 1 of 1 (latest)

hollow mesa
#

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