Resetting all DataStores

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.

3 Likes

I think if you create a new baseplate and use save to roblox as and overwrite this place you are referring to, it will reset the data store.

3 Likes

I don’t believe there’s a solution that’ll help you, but for future needs you should make your DataStore key like so

Key = 1  -- increase this by 1 each time you want to restart your datastore
DataStoreService:GetDataStore("DataStore"..Key)

This way you’ll know how many different datastores you have and you can create a for loop to check all your datastores.

16 Likes

That’s a good idea, I will try it.

2 Likes

That won’t work. DataStores are saved by game instead of by published place.

5 Likes

Yeah, I tried it. Seems the only way is to re-publish it as a new place and close the old one.

1 Like

I don’t think that will work as part of the GDPR takedown request - you still technically have access to the data somehow.

3 Likes

You should revert your place to certain dates and see if the user’s data is there. That would be your best bet I guess.

2 Likes

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")

1 Like

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.

Good luck!

8 Likes

There is a pretty cool plugin called “Data Store Editor” by CrazyMan32 which could help. It lets you to view, edit and delete data in your data store.

2 Likes

You’d need to know the DataStore key, which is what OPs asking for. It could help though.

2 Likes

If you still haven’t resolved this issue, you may as well email Roblox support for assistance with this kind of matter to avoid further issues.

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.

2 Likes

About GDPR and CCPA | Roblox Creator Documentation you can but you can roblox created a way to erase a single players data

3 years later, i have found a solution, here:

1 Like