For anyone dealing with GDPR, I believe this script I whipped up will work. Put this in your command bar then use clear(userId, name)
(also in the command bar) to clear someone’s data.
If you use combined data stores, the name will be your master key. Otherwise, it’s your normal name.
local DataStoreService = game:GetService("DataStoreService")
function clear(userId, name)
local orderedDataStore = DataStoreService:GetOrderedDataStore(name .. "/" .. userId)
local dataStore = DataStoreService:GetDataStore(name .. "/" .. userId)
while true do
local pages = orderedDataStore:GetSortedAsync(false, 100)
local data = pages:GetCurrentPage()
for _, pair in pairs(data) do
print(("key: %d"):format(pair.key))
dataStore:RemoveAsync(pair.key)
orderedDataStore:RemoveAsync(pair.key)
end
if pages.IsFinished then
print(("finished (%d: %s)"):format(userId, name))
return
end
end
end