The config system requires a writeable filesystem. It does not function in Roblox Studio or executors that do not expose
writefile.How it works
Every element that has aFlag string is automatically tracked by the window’s ConfigManager. When you call Save() on a config, each tracked element’s current value is serialised to a JSON file under:
Load(), those values are pushed back into each element by calling its own setter (Set, Select, Update, etc.), so callbacks fire as normal.
Saveable element types
| Element | Saved field |
|---|---|
| Toggle | Value (boolean) |
| Slider | Value.Default (number) |
| Input | Value (string) |
| Dropdown | Value (string or table) |
| Colorpicker | Default (hex) + Transparency |
| Keybind | Value (string) |
Setup
Set a Folder name when creating the window
Passing
Folder to CreateWindow initialises the ConfigManager and creates the storage directory automatically.Add a Flag to every element you want saved
Any element with a unique
Flag string is registered in Window.PendingFlags and picked up automatically on the next Save() or Load().Get the ConfigManager and build the config UI
Window.ConfigManager is available after the window is created. Use ConfigManager:AllConfigs() to enumerate saved configs for the dropdown.ConfigManager API reference
ConfigManager:Config(name)
ConfigManager:Config(name)
Alias for
ConfigManager:CreateConfig(name). Returns a ConfigModule object.ConfigManager:CreateConfig(name, autoload?)
ConfigManager:CreateConfig(name, autoload?)
Creates a config object. If
autoload is true, the config is loaded automatically 0.5 seconds after it is created, provided the file already exists on disk.config:Save()
config:Save()
Collects all flagged element values from
Window.PendingFlags, serialises them, and writes the result to WindUI/<Folder>/config/<name>.json. Returns the saved data table.config:Load()
config:Load()
Reads the config file from disk, migrates legacy formats, and calls each element’s setter via the parser. Returns the custom data table on success, or
false, errorMessage on failure.config:Delete()
config:Delete()
Deletes the config file from disk and removes the entry from
ConfigManager.Configs.ConfigManager:AllConfigs()
ConfigManager:AllConfigs()
Returns a list of config names (without
.json) found in the config folder.ConfigManager:GetAutoLoadConfigs()
ConfigManager:GetAutoLoadConfigs()
Returns a Lua array of config name strings for all configs that have
AutoLoad = true in the current session.ConfigManager:GetConfig(name)
ConfigManager:GetConfig(name)
Returns the in-memory
ConfigModule for a given config name, or nil if it has not been created in this session.ConfigManager:DeleteConfig(name)
ConfigManager:DeleteConfig(name)
Deletes a config file by name without requiring a
ConfigModule reference.config:Set(key, value) / config:Get(key)
config:Set(key, value) / config:Get(key)
Store and retrieve arbitrary custom data alongside element state.
ConfigManager:SetPath(customPath)
ConfigManager:SetPath(customPath)
Override the default storage path. The path must end with
/ or one is appended automatically.Auto-load
Setautoload = true in CreateConfig (or call config:SetAutoLoad(true) before saving) and the config will be restored automatically on the next session, 0.5 s after the config object is created.