I need to find all DataStore titles that have existed in my game in order to clear the data.
by DataStore titles I mean the "TestData" within: DataStoreService:GetDataStore("TestData")
I got a right-of-erasure-request about 10 days ago, just noticed it in my inbox today… I attempted to delete this user’s data from my games but it failed. The problem I’m having is it probably failed because I’ve been changing the DataStore titles frequently (my game is in early testing stages) and I don’t have the titles of my older DataStores. I’m not sure if I can get banned for failing to delete his data upon request, even if the DataStore was renamed, his data still exsits somewhere.
I successfully erased my own data to see if the code worked, but when I tried it for the requested user, it failed. Tried the same thing in all my other projects that use DataStores. I’ve searched for solutions but was unsuccessful at finding any similar questions.
Regardless of the right-of-erasure-request, the game is in early testing stages, so erasing all old data is something I’d like to do anyway.
Uhh do you have a named DataStore or is it called by value?
I call to mine and use dates for references, so if I change the date as such “3/2” to “3/6” then the data will reset, any chance you can message me and I’ll see if I can help you with your DataStore.
Example: local DataStore = game:GetService("DataStoreService"):GetDataStore("PlayerData", "3/2")
Download previous revisions of your game, by going to the URL roblox.com/asset/?id=PLACEID&version=VERSIONID, (ensure Roblox+ is disabled), then add a .rblx to the end of the file to make it openable in Studio, from there you will have to manually go through and see what the DataStore was used in that game version.
Sidenote: DataStore’s have a second parameter which is the scope, this is useful for this kind of situation
game:GetService('DataStoreService'):GetDataStore('MainData', 1) -- Increase the number every time you want to reset data.
Here is another approach for when your game is nearly done:
When you save player data, save the current key within the player data. And then when the data is fetched again, if the player’s saved key is different from the server’s key, then erase their data, and go through the process of re-initializing their data again.
This method requires more work, but in the end, it is the ideal way to handle unnecessary data.