Currently, I’m making a command called searchplayer (UserId). This is supposed to find that UserId of the player and then give information about them, however, instead of looping through all the players in-game, I want to loop through every single account on Roblox. Is there any simple way to do this?
I do not need help making the command nor finding information about the user, I just need help with searching through every account created.
There are over one billion accounts registered on Roblox. This is going to take a suuuuuuuuuuuper long time. There are also terminated accounts in between, so you may not be able to grab some information about those. Anyways what is your use-case for something this hefty?
I am gonna go ahead and assume you have already created such function, but the question is why do you need to go through every single account when you can just search a specific user ID without going through the hassle the former will make you go through
I find it more convenient, and a better way to find a player’s information instead of having to search their username on the site. There is a way to do it, considering in one game you can search any player’s criminal record by typing their username in.
You should not be looping through all of the players on Roblox to find information about any one specific user, as that is an incredibly inefficient method to achieve what you want. In the specific use case you mentioned about searching up somebody’s criminal record(I’m going to assume you’re talking about in the game and not Roblox’s moderation history) what you want to do is access a table in the game where the values for each player are stored with a key pertaining to that specific player.
There will not be a player object for users who are not in the server. You may have to set up an external server, and use HTTP service to have it relay information from the Roblox website. Either that or you may be able to cache user’s info using the datastore service when they are in the game, depending on your usecase.