Hey! Im kinda new to Datastores and i wanted to make a In-Game datastore editor, So what would be the best way to achieve this? Something like Datastore Editor plugin would be something that i want to achieve, But in-game.
As far as I know there arent really any methods to get all datastores, so you would have to list the datastores you need manually
Edit: DataStoreService:ListDataStoresAsync() exists, tho it returns DataStoreListingPages instead of {DataStore}. Maybe iterating through the pages and getting DataStoreName from the DataStoreInfo instances could work.
function GetAllDataStores(): {DataStore}
local DSS = game:GetService('DataStoreService')
local ListingPages = DSS:ListDataStoresAsync()
local DataStoreList = {}
repeat
for _,DataStoreInfo in ListingPages:GetCurrentPage() do
table.insert(DataStoreList,game:GetService('DataStoreService'):GetDataStore(DataStoreInfo.DataStoreName))
end
until ListingPages.IsFinished == true
return DataStoreList
end