> For the complete documentation index, see [llms.txt](https://rpg-system-all-in-one.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rpg-system-all-in-one.gitbook.io/documentation/good-to-know/get-rpg-reference-of-a-player.md).

# Get RPG Reference of a Player

To access to the RPG functions you always need to get the **RPGSystem Component** **reference** of the player. <br>

#### Using GetPlayerCharacter

{% hint style="info" %}
Keep in mind that `GetPlayerCharacter()`only returns the **local character reference** and should only be used for **Client-Side stuff in Multiplayer**. (Inside widgets for instance). Make sure to always grab the replicated reference of a PlayerCharacter!

\
If you want to go for Singleplayer only then feel free to use it anywhere.
{% endhint %}

<figure><img src="https://1740300672-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUQeXeV7FmOzkOjebs98Y%2Fuploads%2FaA0uhBstHDpDlWIwbPzP%2Fimage.png?alt=media&amp;token=9a72e1b0-91ef-45b7-9274-0e0fc5216d2d" alt=""><figcaption></figcaption></figure>

#### Getting the Reference through Server

If you are on a server environment then you can use `GetConnectedPlayer()` from the **GameMode**. It outputs the **RPGSystem Reference**.

<figure><img src="https://1740300672-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUQeXeV7FmOzkOjebs98Y%2Fuploads%2FgnzsTPANypY4u1HyNTwA%2Fimage.png?alt=media&amp;token=5eb4b0da-a037-4d5a-ad15-a32f3ccc8582" alt=""><figcaption><p>Only works if executed from the server</p></figcaption></figure>

#### Getting **PlayerCharacter Reference** throught the **RPGSystem Reference**.

Just use `GetOwner()` on the **RPGSystem Reference** to get the PlayerCharacter reference

<figure><img src="https://1740300672-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUQeXeV7FmOzkOjebs98Y%2Fuploads%2F1dRjlnictQKkDoaEVAUi%2Fimage.png?alt=media&amp;token=d1e1c14f-c054-4a6b-80e4-01a26703a542" alt=""><figcaption></figcaption></figure>
