I need to know what DataStores do I have in my game.
What command do I need to execute in the console so it tells me all the names of DataStores in the experience?
I tried executing game:GetService("DataStoreService"):ListDataStoresAsync() but it did nothing.
Is this script going to do the job? And do I put this into a script or can I just run it in the console?
local DataStoreService = game:GetService("DataStoreService")
-- Enable experimental features (beta period only)
local options = Instance.new("DataStoreOptions")
options:SetExperimentalFeatures({["v2"] = true})
local listSuccess, pages = pcall(function()
return DataStoreService:ListDataStoresAsync("house")
end)
if listSuccess then
while true do
local items = pages:GetCurrentPage()
for _, ds in ipairs(items) do
print(ds.DataStoreName, "| Created:", ds.CreatedTime)
end
if pages.IsFinished then
break
end
pages:AdvanceToNextPageAsync()
end
end
I’m not good at scripting or DataBases, that’s why I keep asking if anyone can tell me how do I use this function. Maybe anyone has a script which you can execute to see all DataStores available in experience?
Only reason I need do to this is because I want to make sure I have checked all my databases for IDs that have to be removed because of GDPR.
Sorry for bumping this, it’s just really important for me to make sure that I have entirely removed that ID from my game. I wanna check all datastores, but I really don’t know how can I get a list of all datastores in game.
After removing that “house” prefix and running the code, yes, it printed out DataStore names on the console.
Now I’d like to list keys. Can you please tell me how to do this? Is there a script that I can use to list keys?