I have a table of ID's that my game automatically checks through to see if you are friends with any certain people, but it is a long list, so is there any way I can get the username from one of the ID's?
Sure. This function
will return the username
from the given id
. :)
function UserFromId(userId) local userSets = game:GetService("InsertService"):GetUserSets(userId) --get the user's sets for _,v in pairs(userSets) do --iterate through then if v.Name == "My Models" then --check if this is the player's models return v.CreatorName --returning the name of the creator of the set "My Models" (the player) end end end print(UserFromId(261))
Locked by adark, M39a9am3R, and TurboFusion
This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.
Why was this question closed?