Class
ConfigSnapshot
NotCreatableNotReplicated
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#
ErrorConfigSnapshotErrorState | Populated if snapshot was in an error state.ReadSafeReadOnlyNotReplicated |
Outdatedboolean | If 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#
| GetValue | Returns the value for the given key. |
| GetValueChangedSignal | Returns a signal that fires when the value for the given key changes due to a refresh. |
| Refresh | Refreshes the snapshot to the latest configuration values. |
GetValue(key: string): Variant#
Returns the value for the provided key in the snapshot.
| Name | Type | Default | Description |
|---|---|---|---|
key | string | Key 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().
| Name | Type | Default | Description |
|---|---|---|---|
key | string | Key of the configuration to get the change signal for. |
Returns
RBXScriptSignal— ADataType.RBXScriptSignalthat 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#
| UpdateAvailable | Fires 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.