# Auxvyn.getAll()

### Syntax

```lua
Auxvyn.getAll(userId: number | string): {[string]: any}?
```

***

### Parameters

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

***

### Returns

A table of all key-value pairs stored for that player, or `nil` if the player has no data.

***

### Example

```lua
local data = Auxvyn.getAll(player.UserId)

if data then
    print("Coins:", data.coins)
    print("Level:", data.level)
    print("Class:", data.class)
else
    print("No data found for this player")
end
```

***

### When to Use getAll vs get

Use `getAll()` when you need to load several values at once on player join — it makes one API call instead of one per key, which is faster and uses fewer requests.

```lua
-- ❌ Slower — three separate API calls
local coins = Auxvyn.get(player.UserId, "coins")
local level = Auxvyn.get(player.UserId, "level")
local class = Auxvyn.get(player.UserId, "class")

-- ✅ Faster — one API call
local data = Auxvyn.getAll(player.UserId) or {}
local coins = data.coins or 0
local level = data.level or 1
local class = data.class or "warrior"
```

***

### 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.getall.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.
