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

How would I make a GUI that would show the LocalPlayer's friends image and there usernames?

Basically what I mean is, how would I make a gui that would get the friends of the localPlayer and put there username in a textlabel and there profile image/headshot image into a text label?

Image 1

(If you are gonna make it or something, upload it to some file sharing site. Remember that it has to be a roblox place lol. I ain't gettin' viruses today or any day.)

1 answer

✓ Accepted answer

It's local script right? For that you will have to check if they are your friends by using:

Player:IsFriendsWith("idOfPlayer")

And then to get the icon its very simple:

local players = game:GetService"Players"
local player = players.LocalPlayer
local thumbnailType = Enum.ThumbnailType.HeadShot -- type of thumbnail, this one shows his head
local size = Enum.ThumbnailSize.Size420x420 -- size of thumbnail
local imageLabel = script.Parent -- Example

local image = players:GetUserThumbnailAsync(player.UserId, thumbnailType, size) -- here you go
imageLabel.Image = image -- makes the image
imageLabel.Size = UDim2.new(0,420,0,420) -- sets the size

Hope i understood you right.

2 comments

0

Hmm...

0

Ok yes I guess that works.

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