How would I go about doing this?
I've tried :GetOrderedDatasStore()
and I get error 503
This is the current code:
function Variables.RemoteFunctions.CheckSearch:OnServerInvoke(Player, Param) local Results = {} local Pages = game:service("DataStoreService"):GetOrderedDataStore("db_profiles"):GetSortedAsync(false, 0, 10000) for Index,Data in pairs(Pages:GetCurrentPage()) do if #Results < 8 then if Data.key:lower():sub(1,#Param) == Param:lower() then table.insert(Results, Data.key) end else break end end print(tostring(#Results)) return Results end
503 is the HTML error code for "Service Unavailable". Perhaps roblox.com's data store repository was down when you tried the snippet, or perhaps you're trying it from playing solo (I don't know the exact behavior of data stores from Studio).