How do i make my player a global variable where i can call on it anywhere

Godot Version

Replace this line with your Godot version

Question

Ask your question here! Try to give as many details as possible
can you explain it very simple

Here’s a video that explains global variables: https://youtu.be/sc-tEPdLZhk?si=HfcymhmVoWSSr4l8

can you break it down in more detail for like getting the global_player position and etc

use

class_name GlobalData extends Object
static var player_data:={}

And you can access it anywhere by GlobalData.player_data