Collapse Sidebar


Sets the value of the key. This overwrites any existing data stored in the key.

If this function throws an error, the Articles/Datastore Errors|error message will describe the problem. Note that there are also Articles/Datastore Errors|limits that apply to this function.

See the Articles/Data store|Data Stores article for an in-depth guide on data structure, management, error handling, etc.


Name Type Default Description


The key identifying the entry being retrieved from the data store

The value of the entry in the data store with the given key


Return Type Summary

No return

Code Samples

Reset Player Data Store

The following example is how you would generally use GlobalDataStore/SetAsync|SetAsync(). However, if more than one server will likely be writing to this key, it’s recommended that you use GlobalDataStore/UpdateAsync|UpdateAsync() instead.