So I want to make a function that gets the player from name. But I don’t know how to get all the players that are on roblox. So what do I do?
Well exactly do you plan to do with this?
Depending on what you’re trying to do, if you have the UserId of the player you can just use this:
But if you’re going for something else please provide more details!
do you mean that you want to get the “Player” object?
I’m making it so that if you type a user in the TextBox, then it will show a picture of it. I’m just experimenting with the Players service.
i think you mean you want to get the player info even if theyre not in the game
to do this you have to use the roblox api (which is blocked inside roblox, so you have to use a proxy which you should host yourself) with an endpoint like https://users.roblox.com/v1/users/{userId}
this post does something like that https://devforum.roblox.com/t/how-to-get-a-players-description/2007037
edit: nvm he wanted the thumbnail
alright shouldn’t be hard:
use GetUserIdFromNameAsync & then from the userid you can generate the thumbnail using GetUserThumbnailAsync
How would I use getUseridFromNameAsync?
just input the user’s username as a argument
players:GetUserIdFromNameAsync(“krazeems”) --returns krazeems’ userid
Ok, I’ll see if it works when I test it.
Thank you. I appreciate the help.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.