DataStores in experience

Hello!

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.

Does anyone know how to do this? I really would like to know which DataStores I have in my experience.

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

:confused: 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.

Have you tried running the code in studio?
Paste the code in a server script and place it in ServerScriptService.

It’ll print the name and the creation date for all of the available datastores in an experience.

Hi, thanks for your reply.

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?

Thanks.