SimpleDataStores-RBLX
  • Roblox SimpleDataStores
  • Player Data
    • PublicPlayerData
    • HiddenPlayerData
    • Folder/Table Data Saving
    • SaveOnDeath and SaveOnRejoin
  • Full errors list
  • Settings
    • CanSaveBackpack
    • SaveInStudio
    • DataStoreName
    • CustomTablePropretiesSave
    • EnableEconomyTracking
    • OutputDebugging
  • Custom Data Module [🔜]
  • Newest Fix
    • LATEST VERSION
    • [COMING SOON] Version 7
    • Version 6
    • Version 5
    • Version 4
    • Version 3
    • Version 2
    • Version 1
  • Help & Feedback
    • Dev Forums
  • Deprecated
    • Data Management Team [🔜]
    • Enhanced Output Debugging
    • Modifications
Powered by GitBook
On this page
  • What is this feature?
  • Settings Classes
  • How to set up
  • Obtainable Variables
  • Possible Errors

Custom Data Module [🔜]

FEATURE IS NOT CURRENTLY RELEASED

This feature is pending release and is not available in any public versions. Please check back soon, this feature will be in Version 7!

USAGE WARNINGS:

  • This feature is classed as advanced and is only recommended to use if you understand what to do

  • This feature can cause your data stores to fail/break. Please use this in a seperate Roblox project during set up to avoid unexpected problems. Please remember to test you changes thoroughly

What is this feature?

Custom Data Module allows a developer to redirect player data to a Module Script rather then the normal Roblox DataStoresService. This is often used in high daily active players game's to manipulate the data saving process for features such as data loss prevention however can be used for other features dependent on what you script or the script you are using. Due to how advanced this is and failing to set up correctly can cause the system to break, I'd recommend following the tutorial below OR using the preset below which uses ProfileStore.

Settings Classes

Name
Type
Function

DataModule

Folder

The folder to place the ModuleScript that will act as the DataStores. If non or more then 2 then defaults to DataStoresService.

GetDataFunction

String

The function string that the ModuleScript requires to get player data

GetDataVariables

String

The values and refrences that the Module Script get function requires.

SetDataFunction

String

The function string that the ModuleScript requires to set/update player data

SetDataVariables

String

The values and refrences that the Module Script set function requires.

StartupFunction

String

OPTIONAL -

StartupVariables

String

OPTIONAL -

How to set up

  1. Firstly, place your module script that will act as the data store to the 'DataModule' folder. Ensure that it is a ModuleScript (purple script) to avoid errors

  2. Next, Change GetDataFunction value to the string of the function used to retrieve the player data and do this for SetDataFunction.

  3. Lastly, Check what veriables are required for the function and refer to the possible variables list below for help on refrencing. Make sure that there is a comma (, ) and space in between each to avoid errors.

Obtainable Variables

Variable
Type
Returns
Available for

player

Instance

Returns the local player instance (may require .UserId to get the User ID)

Set, Get and Startup

playerstats

Table

Returns the raw table that is trying to be saved

Set

leaving

Bool

Returns true if the player is leaving the game and false if the player is resetting/dead

Set

backpackonly

Bool

Returns true if the game only want's the player backpack and false if it wants all player data

Get

DataStore

ModuleScript

Returns the Module Script being used for Custom Data Module. If non then returns DataStoreService

Set, Get and Startup

GetData

String

Returns the function string used to fire GetData

Set, Get and Startup

SetData

String

Returns the function string used to fire SetData

Set, Get and Startup

GetDefaultStats

Table

Returns the default values that a player first playing the game would recieve

Set, Get and Startup

Possible Errors

Error Information: Output Debugging enabled is not required to recieve any of these errors, when an error occours, the script will automatically switch back to Roblox DataStoresService to prevent further errors.

Error Message
Reason
Solution

Only 1 instance can be in DataModule folder. Please ensure that there is only 1 ModuleScript in DataModule Folder

There is 2 or more instances/scripts in the DataModule folder

Only have 1 ModuleScript in DataModule folder

Module Script not found in DataModule folder

There is something in DataModule folder but it's not a ModuleScript

Replace what's in DataModule folder with a ModuleScript and ensure it does not return nil.

DataStore could not be set up correctly. Please follow the documentation or DevForums post for more infomation on how to fix.

The system experienced an error when requiring the module script.

Make sure the ModuleScript returns something except nil or you may be experiencing a Roblox related problem like an outage.

PreviousOutputDebuggingNextLATEST VERSION

Last updated 4 days ago