Show the avatar GUI

Hi,
I’m trying to display the avatar GUI of a player like this:


But how do I open it with a script?

1 Like

I’ve found a way to do what I wanted:

local StarterGUI = game:GetService("StarterGui");
local Players = game:GetService("Players");

StarterGUI:SetCore("AvatarContextMenuEnabled", true);

-- Display the avatar context menu
StarterGUI:SetCore("AvatarContextMenuTarget", Players:GetPlayerByUserId(674189882)); -- I put the UserId of the player I want.

But can I do this for a player how isn’t in the server?

1 Like

You Can’t Access The CoreGUI In The Server As It’s From The Client.

1 Like

The GUI works perfectly fine now, I’ve found this script:

But I have another problem. I want to display the avatar of a player, even if he is not in the server. Is there a way to do this?

1 Like

Oh I read the bold text completely wrong sorry on my behalf.

2 Likes