how do I save variables

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

in GDscript when I switch scenes my variables reset. how do I fix this.

:bust_in_silhouette: Reply From: antoniodev

When you go to project settings there is an option for Autoloads and Singletons, I’m new so I don’t really know how that works but I know you can have a scene running in the background, like you have your current scene and your autoload scene. Hope that helps a little bit.

:bust_in_silhouette: Reply From: magicalogic

Autoload is the way to go here. This article from the docs explain everything you need to know in a not very technical way.