10 min read

Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.

Experience configs

Experience configs let you update in-game values in real time without restarting servers:

Configs take the form of keys and values. Rather than using hard-coded constants in your code, you can use the key to get a value (string, number, boolean, or JSON object) and then update that value whenever you'd like without publishing a new version of your experience. The required code changes are minimal:

local ConfigService = game:GetService("ConfigService")
local configSnapshot = ConfigService:GetConfigAsync()
local myValue = configSnapshot:GetValue("my_key_name")

You can have up to 1,000 active configs at any given time and manage them on Creator Hub or in Roblox Studio.

Overview of the Configs page on Creator Hub

Create and edit configs

  1. On the Creator Hub Configs page for your experience, click Create config.

  2. Specify a key, a type, a value, and optionally, a description to help you or your team later identify the purpose of the config. Supported types are string, number, boolean, and JSON object. Click Next.

  3. (Optional) Add targeting conditions and values. Conditions let you apply config values to users who match (or don't match) certain criteria, such as users who have never played your game or ones who speak Portuguese. To learn more, see Target configs to specific players.

  4. Copy the generated code snippet into a server script in your experience, likely in ServerScriptService. For "global" configs that don't differ by player, the code might look something like this:

    local ConfigService = game:GetService("ConfigService")
    
    local configSnapshot = ConfigService:GetConfigAsync()
    local MY_KEY = "my_key" -- optional, store the config key as a constant
    local myValue = configSnapshot:GetValue(MY_KEY)

    For conditional configs and experiments, the code is slightly different:

    local ConfigService = game:GetService("ConfigService")
    local Players = game:GetService("Players")
    local MY_KEY = "my_key" -- optional, store the config key as a constant
    
    local function onPlayerAdded(player)
        local playerConfigSnapshot = ConfigService:GetConfigForPlayerAsync(player)
        local myValue = playerConfigSnapshot:GetValue(MY_KEY)
    end
    
    Players.PlayerAdded:Connect(onPlayerAdded)
  5. Use the value like you would any other variable. Configs do nothing unless you use them within your code.

For more information about working with configs in your scripts, see Add configs to your code.

Editing a config is no different from creating one. Click the Edit button and update the value and description as-desired.

Limits

Config values have the following limits by type.

TypeMaximum size
String100,000 characters
Number±1.7976931348623157e+308, ±2^53 for exact integer representations
BooleanN/A
JSON100,000 characters

Publish configs

After you create a config, it moves to a staged state so that you can test it before it becomes publicly available. Staged changes are available to you and your team in Studio play sessions, not to players in live experiences. The Configs page on Creator Hub shows all active and staged changes.

The Configs page showing unpublished changes
  1. After you test your staged changes, click Publish now to publish to all players almost instantly (roughly between 15 seconds and 1 minute). You can also choose Publish over 15 min if you prefer a longer, more gradual rollout period. In some cases, clients may take a few minutes to reflect the changes after publishing.
  2. (Recommended) Add a descriptive publish message that indicates what you updated. This message appears on the History page and can help you and your team later identify the purpose of the change.

Target configs to specific players

By default, a config delivers the same value to everyone. Conditional configs let you deliver different values to different players based on player attributes (country, tenure, language, payer status, etc.).

Conditional configs have three parts that determine what value a player receives:

Supported attributes

Conditional configs support the following attributes. These attributes share the same definitions as the equivalent filters and breakdowns in the analytics dashboards.

AttributeDescription
CountryThe player's geographic location.
LanguageThe player's language setting.
New vs returningWhether the player is playing your experience for the first time or has played it before.
SourceHow the player found your experience, such as a home page recommendation, search, or a sponsored ad.
When user first playedHow long ago the player first played your experience, such as 0-30 days ago or 31-90 days ago. Calculated daily.
In-experience active payer statusThe player's payment activity within your experience, which lets you target different segments of paying users. Calculated daily.
In-experience activity statusHow recently the player has played your experience, which lets you treat new, active, lapsed, and reactivated players differently. Calculated daily.
User engagementHow much the player plays your experience each week, which lets you separate your most engaged players from more casual ones. Calculated daily.
Platform spender statusWhether the player is a Roblox platform-wide active spender. Calculated daily.
Platform activity statusHow recently the player has played anywhere on Roblox, rather than only in your experience. Calculated daily.

Create conditional values

You add conditions when you create or edit a config. On the Add targeting step, add a condition:

  1. Choose an existing condition or click Create a new one.
  2. Add one or more rules.
  3. Set the value that matching players receive.

For example, to give a harder experience to top active payers who started playing within the last 30 days, you might increase their dynamicBossHealth value.

The Add targeting step showing conditional rules for a config

Access targeted values in code

To retrieve targeted values, use ConfigService:GetConfigForPlayerAsync(), which evaluates the rules and ordering for an individual player. ConfigService:GetConfigAsync() does not apply targeting because it isn't specific to a single player. For more information, see Add configs to your code.

Best practices and limits

Create and edit configs in Studio

If you prefer, you can create, edit, stage, and publish configs in Roblox Studio. Click File > Open Configs to open the widget. The Studio interface is particularly convenient for staging and testing new values.

Studio window for working with configs

Publish configs to another experience

In Studio, you can publish your configs to another experience, which completely overwrites the configs for that experience. This can be especially useful for syncing configs from a staging or development experience to the live experience.

  1. In Roblox Studio, go to the top menu and select File > Open Configs.

  2. In the Published tab of the Configs widget, click the ⋮ icon and select Publish As.

    Studio window for working with configs
  3. In the dialog that appears, find and select the target experience from the list of groups where you have edit permissions.

    Publish configs to experiences

View history and restore configs

On the Configs page, click History to see past updates. Each update has the time and date of the change, who made the change, and the publish message.

The history page with diff expanded for a config value

The History page also lets you restore configs to a previous state:

  1. Click Restore next to the change to stage the "before" value. Note that restoring a config discards any existing staged changes.
  2. Return to the Configs page and publish the config.

Add configs to your code

The main class for working with configs is ConfigService, which fetches the latest keys and values for your experience. ConfigService is only available to server scripts. Attempting to call its methods from a client script results in an error.

The first step to working with configs is to retrieve a ConfigSnapshot, the latest values for all configs at the current point in time. There are two methods for getting a snapshot:

In either case, if the key doesn't exist, ConfigSnapshot:GetValue() returns nil.

Autocomplete

Configs are integrated into the Script Editor's autocomplete. When you call ConfigSnapshot:GetValue(), the editor suggests your config key names and displays each config's type when you hover over the variable name.

If your script uses --!strict mode, the linter can pick up and verify the type for you.