Customizable basic DataStore module

I created a DataStore module that uses basic caching and functions to save/load data. It has a variety of functions you expect from normal DataStore as well as a lot of customization to it.

DataSaveModule.rbxm (5.6 KB)

You can do the following:

  • Customize function names, they appear as exactly as you expect them to be when you try to index them after requiring the module. Want “UpdateAsync” to become “Save”? No problem.
  • Customize event names as you like, these events are fired when a player’s data is saved to Roblox or when a player’s cache updates
  • Auto save functionality per minute(s)
  • Setting that automatically saves/loads data upon joining so you don’t have to do the extra work of saving data for players when they leave or the game shuts down
  • When auto saving data per minute(s), if you try to save manually it skips the player’s save until the next set minute(s) to autosave to prevent redundant saves. It also prevents redundant saving when the auto save already saved the player’s data when a script tries to save data recently to the auto save

This only fulfills basic purposes and is only for the normal DataStore, it does not help create OrderedDataStores.

I have not tested the module so bugs could be found, an example script comes with the module so remove it if you would like to use your own code.

1 Like