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

How to get player's profile picture in Roblox? [closed]

Asked by 4 years ago

Hello! So I made a trading system that works fine, but, I want it to have peoples' profile pictures on the trade icon. How would I do that? Thanks in advance =)

Locked by JesseSong, DarkDanny04, and Nguyenlegiahung

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

2 answers

Log in to vote
Answered by
JesseSong 3916 Moderation Voter Community Moderator
4 years ago
Edited 3 years ago

What to do?

Hello, so basically you'd use something called Players:GetUserThumbnailAysync this function stores data for players profile pictures.

What you need

You will need an:

  • image label

  • A local script

  • Image button

  • ScreenGui

Here's the script:

local Players = game:GetService("Players")

local player = Players.LocalPlayer

-- Fetch the thumbnail
local userId = player.UserId
local thumbType = Enum.ThumbnailType.HeadShot
local thumbSize = Enum.ThumbnailSize.Size420x420
local content, isReady = Players:GetUserThumbnailAsync(userId, thumbType, thumbSize)

-- Set the ImageLabel's content to the user thumbnail
local imageLabel = script.Parent
imageLabel.Image = content
imageLabel.Size =, 420, 0, 420)

If you need any more assistance on how to use this, watch this

Thank you so much!!! alexfinger21 341 — 4y
NP JesseSong 3916 — 4y
Log in to vote
Answered by 4 years ago
local Player = game.Players.LocalPlayer

script.Parent.Image = game.Players:GetUserThumbnailAsync(Player.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size420x420)