how do I get my players global position and save it

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

I am making an rpg and need to get my players global position how do I dotaht

Use the get_global_position() method on the player’s Spatial or Node2D node (the method is inherited by the descendants of these nodes, e.g. KinematicBody and KinematicBody2D).

Ertain | 2020-07-05 17:17

ertain - that gives me an error on rigidbody

fuck | 2020-07-06 09:52

Whoops, I meant to write global transform. So the code to use is something like the_rigidbody.global_transform.origin to get its position in 3D.

Ertain | 2020-07-06 16:23

:bust_in_silhouette: Reply From: JimArtificer

Another user already provided an answer to the first part of your question. There is a tutorial about save files here: