Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to get player's profile picture in Roblox?

2 answers

✓ Accepted answer

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 = UDim2.new(0, 420, 0, 420)

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

2 comments

0

Thank you so much!!!

0

NP

local Player = game.Players.LocalPlayer

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

This discussion is preserved as it was. New answers, comments, and votes are closed.