GetUserInfosByUserIdsAsync has incorrect code sample

https://developer.roblox.com/en-us/api-reference/function/UserService/GetUserInfosByUserIdsAsync#code-samples

Problem 1:
The code sample found on this page uses the Players service, which is incorrect (it also doesn’t even define Players anywhere). It should be using UserService instead.

Problem 2:
The code sample uses 8000 as an example UserId, but that id isn’t available. This means that the code sample’s result variable is empty. If the result variable is empty, then nothing gets printed in the code sample.

The UserId should be something like 1 instead of 8000.

image

3 Likes

Hey, thanks for flagging this! I’ve just added it to the team’s backlog, and they’ll get to it when they can.

5 Likes

The GetUserInfosByUserIdsAsync source code hasn’t changed :sob:

Thanks for your report! We’ve triaged the issue and will follow up when it has been resolved.

2 Likes

Alright Great :+1: becuase i had an issue with GetUserInfosByUserIdsAsync but i managed to fix it with some help from the developer forum. and i saw a few people run into the same issue so it’ll be great if it was fixed. But anyways enjoy the rest of your day or night

This issue has been fixed! Thanks for your report.

4 Likes

This topic was automatically closed after 22 hours. New replies are no longer allowed.