This seems so simple, yet I just can’t figure it out. Maybe I’m overlooking something. It’s easy to get UserId from Username but not the other way around. If I understand correctly, I need to use HttpService to do something as simple as this. I tried using api.roblox.com but got “Trust check failed”.
I have to use their UserId as their DataStore key in case they change their name but then when my leaderboard gets the data, I’m stuck with a UserId and no username to display.
As Syo_1 said, there’s a method to do what you are looking for. You’re not allowed to send HTTP requests to any website ending in .roblox.com. These APIs are meant for usage in other applications, not games.