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

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

Asked by 4 years ago

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

Log in to vote
0
Answered by
imKirda 4491 Moderation Voter Community Moderator
4 years ago
Edited 4 years ago

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.

0
Hmm... SharkTailOof 22 — 4y
0
Ok yes I guess that works. SharkTailOof 22 — 4y
Ad

Answer this question