Is there a way for developers to access the information being stored in DataStores from their games or is it all stored Roblox server side? I have never actually thought about this before but say for example someone makes a tycoon that automatically saves ever 5 minutes, and some bug happens that causes player data to not load, is there a way for developers to access that information like save data in order to restore it? I suppose another way would be to have data save inside a folder (which could be risky) or by using Trello to store information, but Trello is not always the most reliable, they have maintenance too!
Hmm well not sure if this is the exact answer to your question, but if something were to happen (for instance, a bug) you could always tell like this:
local Datastore = game.DatastoreService:GetDataStore('PlayerData')
-- // When you'd want to save data //
local Data = {
Money = player.Money -- This is an example.
}
local success, errorMsg = pcall(function()
Datastore:SetAsync(player.UserId,Data) -- Probably use UpdateAsync over SetAsync, but again, just an example
end
if not success then
-- This means it failed to save, in which we can try saving again, or whatever we see fit.
end
As for accessing information in a datastore, you can just use GetAsync(Key), and then print what it returns.
If this isnt what you wanted could you explain in more detail?
What I mean is, do developers have access to information stored within DataStores or is that off-limits? But this would work! Saving data in a folder might actually be a better way to go, like if I put a folder in ReplicatedStorage and named it “Player_Save_Data” and had a script save all the data to that folder. My only concerns with that would be it getting overcrowded over time and causing lag, and exploiters being able to access that information through the use of a GUI.
What kind of information do you want access to?
Also you cant store data in a folder, unless you are using DatastoreService to save the information inside of datastores, otherwise you cant save folders, as the stuff in them is based on server to server, and not global stuff.
Just about anyway you do data, exploiters will be able to access it, but as long as you do it right (which its hard to do it wrong) They wont be able to change any values, they can only see the data.
Well, save data specifically in order to restore a player’s save if something goes wrong. I know it can be done with games like Lumber Tycoon 2 for example where if a save gets wiped it can be restored.
Ah okay, thank you for clearing that up. I didn’t actually know that, I thought it was possible. There’s also always a risk of accidentally deleting it without realising which would be bad.