hello? I have a question regarding the game data storage system.
I am creating a seed exchange system using gui buttons.
However, the exchanged values are visible in the gui connected to the leaderboard, but the data is not saved and the changed values are not applied during the game. Can you tell me the answer to this question?
All values previously obtained using the tool will be saved.
remember to respect the timing limits of dataStore Services.
I dont know if youre updating the value of a datasore everytime you make an exchange. this is verry bad for datastore.
I whould recomend handlind exchages in the server and have a table that stores all the data and ONLY save the data when a player LEAVES THE GAME. this way you can still make exchanges but they will be saved to a data store when a player leaves the game
EXAMPLE:
player bought a seed and exchanged it .
save that value in a table and update (like leaderboards and uis)
when player leaves the game call data store service to save that table.
local scripts can not change stuff on the server. so localy the values are updated but the server sees the original values. fire a remote event when you want to update the leaderboard and change it server side.
I used the script you sent. The data values obtained by stepping on the part are saved, but when applied to the exchange system I created, the changed values are not saved. Sorry.