Trying to make a In-Game datastore Editor

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.

Help would be very appreciated. :sparkling_heart:

3 Likes

You could make a gui using textboxes for the datastore & key names and textbuttons for setasync and getasync

2 Likes

Do you know how could i list all the datastores in a table?

1 Like

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

this function returns all datastores in your game :wink:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.