I’m making a game where you search the User’s ID in the game and information about the user pops up. I have no issue doing this, but I want to implement another feature; How many times an ID has been searched up. An example of this is like the one in Outfit Checker:
I’m thinking you would need a datastore 1st off.
Then when a ID is serched you could add that to a running total for that ID to the datastore.
However this may get a bit out of control when 1000’s of players … Myself, I’d fake it or forget it.
I could be off here … never tied anything like this. Maybe someone else knows better.
DataStores don’t have to be specifically for players - they take a Key and a Value. In this case, your Key could be the ID of the user, and the Value could be the number of times they have been searched. Every time the user is searched, increment the Value in the DataStore by 1. Then, when an ID is searched, grab the value stored in the DataStore and display it. It should be quite a simple concept.
I would recommend using ProfileService or DataStore2 as accessing/potentially amending DataStores across multiple servers at the same time could lead to data loss.
A better solution for many requests happening all the time could potentially be a web server/external database, though this would require additional setup and cost.