> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sirius.menu/llms.txt
> Use this file to discover all available pages before exploring further.

# Loading the Rayfield library

> How to load Rayfield into your script and enable configuration saving.

Rayfield Gen2 is out
New

A ground-up rebuild — faster, undetectable by design, and actively developed. Use it for new scripts instead of Rayfield (2022).

Read the Gen2 docs


[Open](https://docs.sirius.menu/rayfield-gen2.md)

Sentivel
Endorsed by Rayfield

Status pages and uptime monitoring for whatever you ship. Free to start.

Take a look


[Open](https://www.sentivel.com/?ref=sirius-docs\&utm_source=sirius-docs\&utm_medium=referral\&utm_content=banner)

> [!NOTE]
>
> **Share your script with the community.**
>
> Publish your script on [RoScripts](https://roscripts.io) so players can find your script.

## Load Rayfield

Add the following line at the top of your script to load the Rayfield library.

```luau theme={null}
local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))()
```

## Enable configuration saving

Configuration saving lets Rayfield automatically persist and restore element values across sessions.

**1. Enable ConfigurationSaving in CreateWindow**

Set `ConfigurationSaving.Enabled` to `true` and provide a `FileName` when calling `CreateWindow`.

**2. Set a unique flag on each element**

Every element that supports configuration saving has a `Flag` field. Make sure each flag is unique to avoid conflicts.

**3. Call LoadConfiguration at the end of your script**

Place `Rayfield:LoadConfiguration()` after all your elements have been created.

```lua theme={null}
Rayfield:LoadConfiguration()
```

Rayfield will now automatically save and restore your configuration on each load.

## Share it

Publish your script on [RoScripts](https://roscripts.io/?ref=sirius-docs) and people can find it by game, copy a loadstring link that keeps working through every update, and see what Scriptsight found when it read the code.

> [card] [Publish on RoScripts](https://docs.sirius.menu/roscripts/publish.md)
>
> List your script for free, with a short link and a Scriptsight review.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.