What do you want to achieve? Hey! I am a new coming Roblox scripter, and I am trying to script something where it gets the players UserId, and then it gets the player thumbnail from the UserId, and then the player thumbnail is on an ImageLabel, but it seems to not be working.
What solutions have you tried so far? I have looked all over YouTube, and the developer forum with this issue.
Code Block:
local Players = game:GetService("Players")
local player_id = Players:GetUserIdFromNameAsync()
local Image_id = Players:GetUserThumbnailAsync(player_id, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size420x420)
script.Parent.Image = Image_id
I really don’t know what is wrong with it but I keep getting a:
Argument 1 Missing or nil.
in the output.
If anyone can help me solve this problem, that would be very helpful.
But what if I want to have the image be for the specified client, not a specific player, so you have all of the players specific images on their clients.
I’m not entirely understanding the situation, but if you want the player to only see their own picture, then put this code in a localscript, define a variable as the name of the LocalPlayer, and put the variable as the parameter for :GetUserIdFromName