Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do you get a UserID From a username?

Asked by
Azenix 1
8 years ago

Is it possible to get a Userid from someone's username, this is for a plugin, nobody is ingame, I'm trying to make something that inserts someone's character model and having usernames be available would be nice.

Apperance = game:GetService("Players"):GetCharacterAppearanceAsync(24477431)
for i,v in pairs (Apperance:GetChildren()) do
v.Parent = game.Workspace
end

that's what I have so far, I can figure out how to get it into a model, and the number is my userID, but it will be from a textbox that has to support both userIds and usernames.

1 answer

Log in to vote
0
Answered by 8 years ago

Try this code m8 , this will give you the Id # only

int GetUserIdFromNameAsync (
    string userName
)

Ad

Answer this question