How do I get the Transform of a KinematicBody to use it in another script?

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

I want to create variables which I can get from any other script. These variables correspond to the XYZ coordinates of the KinematicBody. First, how do I create those variables? And second, how do I call them from another script?

:bust_in_silhouette: Reply From: kidscancode

You can already access the transform from any other node. Get a reference to the KinematicBody and use body.transform.