I have to loop through 100 players that is stored inside a data store to put their names on a leaderboard.
I’m making this post because :GetNameFromUserIdAsync() gives me a “Too Many Requests” error.
I saw a post about this which recommended making a cache but I wanted to know if there was an easier solution to this.
I will refer you to the roblox dev documentation.
DO NOT CALL ASYNC SO FAST!!! SOTP IT!!! AHHHHHHHHHHH!!!
Please switch to profile service or some other data storing method there are quite a few new ones out too. This allows you to call the player directly of the datastore.
Nooooo nooo, do you not understand the real world problems of that? The reason they do this is because its safe, and it allows for anyone in the world to code and make games. I would never allow someone the access to call async millions of times a second to my server. That is how you crash your entire server base in 1 day lol. If they enabled that they would have to verify and require devs to go through an application process to become a trusted dev. Do you really want that?
You should only ever call “getnamefromuserid” once, and that is when you are adding a player into your leaderboard. After that point their name should be cached for easy reuse.