# Auxvyn.get()

### Syntax

```lua
Auxvyn.get(userId: number | string, key: string): any
```

***

### Parameters

| Parameter | Type             | Required   | Description                 |
| --------- | ---------------- | ---------- | --------------------------- |
| `userId`  | number or string | <h3>✓</h3> | The player's Roblox user ID |
| `key`     | string           | <h3>✓</h3> | The key to retrieve         |

***

### Returns

The value stored at that key, or `nil` if the key does not exist.

***

### Example

```lua
local coins = Auxvyn.get(player.UserId, "coins")

if coins ~= nil then
    print("Player has", coins, "coins")
else
    print("No coins data found — using default")
    coins = 0
end
```

***

### Always Handle nil

`Auxvyn.get()` returns `nil` for players who have never had data stored. Always provide a fallback:

```lua
local coins = Auxvyn.get(player.UserId, "coins") or 0
local level = Auxvyn.get(player.UserId, "level") or 1
local username = Auxvyn.get(player.UserId, "username") or "Unknown"
```

***

### What's Next


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://auxvyn.gitbook.io/auxvyn-docs/module/auxvyn.get.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
