How to convert a username into an id

how to convert a username into an id e.g. builderman will be 156

You cant convert a name to a userid, but you can get a name from a userid like so using player service

local Players = game:GetService('Players')

local UserId = 156
local Name = Players:GetNameFromUserIdAsync(UserId)

print(Name) -- builderman
1 Like

well that sucks but thx anyways

You can use GetUserIdFromNameAsync to get the UserId.

3 Likes

Yes I said the wrong one, I meant this, please set this as the solution please :D