How would I get all players’ data from a dataStore? I’m making a ban module with a function called “BanService:GetBannedUsers()” and using “table.insert” to insert to the table with all banned players that will be returned.
What have I tried so far? I’ve looked through many devforum posts trying to find a solution, however, all of the ones I found were to do with a global leaderboard, I simply want to get all the banned players.
Think it’s not possible to just make a call to every single key there exists. You should try to store the keys that refer to the banned users rather than tagging users banned.
Then use a separate DataStore that stores anything(a boolean, doesn’t matter if it’s true or false) and then use ListKeysAsync to find every listed player on that store. Keys should probably be the UserId as far as I’m concerned.