API:Class/GlobalDataStore/RemoveAsync

RemoveAsync

YieldFunction of ExplorerImageIndex69.pngGlobalDataStore
Variant RemoveAsync (
    string key
)
Parameters:
  1. key

Returns: Variant
Description: The RemoveAsync function removes the given key from the function’s DataStore. The function returns the value that was associated with that key (values in DataStores are set with SetAsync and UpdateAsync). If the key is not found in the DataStore, then the function will return nil. If GetAsync is called on a key that was removed with this function, GetAsync will return nil.


Like other data store functions, this function cannot be called too often. It shares a throttling budget with SetAsync and IncrementAsync. The remaining budget for a place can be checked while the place is running with the GetRequestBudgetForRequestType function.

If this function throws an error, the error message will describe the problem. A full list of DataStore errors can be seen here.

This function currently has a bug where it always returns a string version of the stored value, not the actual value itself.