Load and save player position

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

For a 3D game, I need to save the player’s coordenates using a ConfigFile and in the next game, load it.
I used the following GDScript code:

config.set_value("values", "player_position", $Player.position)

For saving it and the following for loading it:

$Player.position = config.get_value("values", "player_position")

I think the game stores this data in the config file as a Vector3(), but it doesn’t work.
The error message is the following:
Invalid call. Nonexistent function ‘load_encrypted_pass’ in base ‘Nil’.
Someone can tell me how I can fix this error?
Thanks in advanced.

:bust_in_silhouette: Reply From: estebanmolca

For the position in 3d I think position no exist. Use: global_transform.origin

config.set_value("values", "player_position", $Player.global_transform.origin)