Service · inherits Instance
ConfigService
A game service that gives access to in-experience configuration with updates in real time.
About ConfigService
ConfigService exposes methods for getting ConfigSnapshot objects.
Configs can only be accessed by game servers, so you can't use
ConfigService within client scripts.
See Experience configs for an in-depth guide on managing keys, deploying real-time updates, error handling, limits, and more.
Methods 4
ClearTestingValue
(key: string) → ()Clears current testing value for the given key.Removes a testing override created by the
SetTestingValue()function. The actual configured value will be returned after calling this function.GetConfigAsync
() → ConfigSnapshotYieldsRetrieves a snapshot of the latest configuration.This function retrieves the latest available configuration as a
ConfigSnapshotinstance without player targeting. Snapshots can be refreshed to the latest values by callingConfigSnapshot.Refresh.Experiments are not applied since there is no player context.
If configuration fails to load and there is no previously available configuration, this function throws an error.
GetConfigForPlayerAsync
(player: Player) → ConfigSnapshotYieldsRetrieves a snapshot of the latest configuration for a specific player.Retrieves the latest available configuration as a
ConfigSnapshotinstance targeting to the given player. Snapshots can be refreshed to the latest values by callingConfigSnapshot.Refresh.This function applies all experiments running for the player.
If configuration fails to load and there is no previously available configuration, this function throws an error.
SetTestingValue
(key: string, value: Variant) → ()Sets a testing override for the given key.Sets a testing override for the specified configuration key in the current server instance. When a testing value is set, calls to
ConfigSnapshot.GetValuefor that key will return the testing value instead of the actual configured value.Testing values can be cleared by calling the
ClearTestingValue()function.
ConfigService also has every member of Instance. Deprecated and Roblox-only members are hidden.
Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.