Can Tier 1 Games Make Save Data System?

I want to do a save data thing like when the player leaves he will save his points he had and when he re-enters he will simply have his points back

3 Likes

You can store players’ points in a global variable when they leave and set their points to the stored value when they join back. Here’s an example that uses 4 global variables:



savedData is a JSON array that stores data items in a [playerName, points] format (for example, if the value of savedData is [["player1","+5"],["player2","+10"]], that means player1 has 5 points saved and player2 has 10). The players’ score is concatenated with “+” when saving to turn them into strings, since the JSON array functions only support strings and not numbers. The values are turned back into numbers when loading the data.

This system is relatively easy to make, however the data will be cleared when the game shuts down or is republished since global variables are stored on game servers. If you want a more robust system you can set up your own external database and use POST requests to save data (here’s a tutorial 【Modd.io Tutorial #40】TIER 1 DATA SAVE SYSTEM | Make with me step by step - YouTube)

2 Likes


man can u help me on this part idk what i need to do next

2 Likes

Set value to the concatenate function.

2 Likes

ok i did it
now what i do

2 Likes

Set text a to + and text b to the player attribute function.

2 Likes

ohhhh man im so dumb i didnt noticed that u can put player attribute on text b ty so much

2 Likes

kyle it didnt work what’s wrong here man


wrong 2

2 Likes

oh nvm ignore me it worked now

2 Likes

I was wondering how you got it to work


2 Likes

What is the default value of savedData in Global Variables?

2 Likes

Yea that what I realized

2 Likes

Ok, do you have scripts that change players’ names (e.g. scripts that add name tags)?

2 Likes

Yea I have ranks and crown script

2 Likes

Ok, you should keep track of the player’s original name from before adding nametags were added, so you can use the original name for identifying the player’s saved data instead of using the player name function.

2 Likes

I’ve tried this

2 Likes

Do you set each player’s ‘Original Name’ variable when they join?

2 Likes

Yesni have set it to "set variable original name of triggering player as triggering players name

2 Likes

Can you show the script where you set the variable?

2 Likes

Ok

2 Likes