→ What is SmartData ?
-
SmartData is a ModuleScript that automatically configures datastores to store player data.
-
SmartData can load and save large amounts of data for each player in record time.
-
SmartData uses ProfileService and thanks to this, SmartData safeguards and prevents potential data loss in case of errors, duplicated items, etc.
-
It only requires 1 line of code and 2 folders to set up your data (Settings and a Folder with data) In other words… you don’t need to code.
→ SmartData Assets
-
SmartData Components: SmartData [ModuleScript] , Settings [Folder] and FolderWithData [Folder]
-
SmartData Components Explained: Here
-
SmartData Example Here
→ How to set up Smart Data and save my data? (example)
[REMEMBER]: Enable in your game the
Allow HTTP Requests
andEnable Studio Access to API Services.
ㅤ
[HOW?]: Inside your Studio in Home tab, click the button GameSecurity
(Publish it if it’s not already), then, go to Security section and there you are going to be able to enable those things and save changes.
-
Create a Script inside ServerScriptService.
(This Script is going to set up the data, you can change the name as you wish). -
Import to your place: SmartData Components and move any component that’s in the “SmartData [COMPONENTS]” [Folder] to the Script, then remove the “SmartData [COMPONENTS]” [Folder].
→ Like This:
--- ServerScriptService:
------- Script:
--------- SmartData (ModuleScript)
--------- Settings (Folder) [with values]
--------- FolderWithData (Folder) [you can change the name as you wish]
- Now, finally, we need to put the following code in the Script:
require(script.SmartData)(script.Settings, true, nil)
[NOTE]
You can change the datastore by changing the value of the
DataStore [StringValue] which is inside the Settings [Folder] which is inside the Script [Script] which is inside the ServerScriptService
[NEED TO KNOW THIS]
Inside “FolderWithData” [Folder] is where you are going to define what you want to save and how you want to save.
ㅤ- You can ONLY insert: StringValues, BoolValues, NumberValues or Int Values.
ㅤ
ㅤ- (For Example): Create a NumberValue called “Coins” inside “FolderWithData” [Folder] and assign a base value by adjusting the Coins Value, let’s say 100.
Then if you play the game, you are going to be able to see in the leaderboard your Coins value, if you change that value by +50 and you rejoin the game, then you can see that you still having 150 Coins.
→ Example Place: Here