Is there a way of getting values from similar keys from datastore?

1 Like

Yeah there totally is!
Check this out: DataStore | Documentation - Roblox Creator Hub

local list = DATASTORE_HERE:ListKeysAsync("PREFIX_HERE")
local results = {}
while wait() do
	for i, item in ipairs(list:GetCurrentPage()) do
		table.insert(results,item)
	end
	if list.IsFinished then break end
	list:AdvanceToNextPageAsync()
end
1 Like

Yes, using ListKeysAsync. There’s also ListDataStoresAsync for DataStores themselves instead of keys, which functions similarly!

The “prefix” string is your “search” term.

1 Like

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