Roblox UtilitiesDevlHub Roblox Documentation

Class

ConfigSnapshot

NotCreatableNotReplicated
Inherits
Object
Memory category
Instances

A snapshot of configuration values at a given version. Can be player-specific.

An object with the configuration values at a specific version. A snapshot can be targeted to a single player to apply experimentation values. This is returned by ConfigService:GetConfigAsync() and ConfigService:GetConfigForPlayerAsync().

For more information, see Experience configs.

Properties 2#

ErrorConfigSnapshotErrorStatePopulated if snapshot was in an error state.ReadSafeReadOnlyNotReplicated
OutdatedbooleanIf true, indicates the snapshot is outdated and can be refreshed to newer values.ReadSafeReadOnlyNotReplicated

Error: ConfigSnapshotErrorState#

ReadOnlyNotReplicatedReadSafe

Populated if snapshot was in an error state.

Outdated: boolean#

ReadOnlyNotReplicatedReadSafe

If true, indicates the snapshot is outdated and can be refreshed to newer values.

Methods 3#

GetValueReturns the value for the given key.
GetValueChangedSignalReturns a signal that fires when the value for the given key changes due to a refresh.
RefreshRefreshes the snapshot to the latest configuration values.

GetValue(key: string): Variant#

Returns the value for the provided key in the snapshot.

NameTypeDefaultDescription
keystringKey of the configuration to get the value for.
Returns
  • Variant — The value of the configuration for the given key.

GetValueChangedSignal(key: string): RBXScriptSignal#

Returns a signal that fires when the value for the provided key changes after calling ConfigSnapshot:Refresh().

NameTypeDefaultDescription
keystringKey of the configuration to get the change signal for.
Returns
  • RBXScriptSignal — A DataType.RBXScriptSignal that fires when the value for the given key changes upon refresh.

Refresh(): ()#

Refreshes the snapshot to the latest configuration values from the service. If not called, the snapshot will continue to reflect the values at the time it was created or last refreshed.

Returns
  • ()

Events 1#

UpdateAvailableFires when a newer version of the configuration is available.

UpdateAvailable()#

Fires when a newer version of the configuration is available than the current snapshot. You can perform validation and/or call ConfigSnapshot:Refresh() to update to the latest values.

Inherited members#

Inherited from Object 6
Properties (2)

ClassName, className

Events (1)

Changed