Is it possible to block a person through GUIs?

I am making a custom leaderboard and I was wondering how I can Friend, Block and see avatar of a person through GUI. I found my answer for friending but I still don’t know how to block a player through GUIs, may someone clue me into it?

1 Like

You can use StarterGui:SetCore using PromptBlockPlayer to block people.

game:GetService("StarterGui"):SetCore("PromptBlockPlayer", {
     Player = game.Players.Player -- Player must be in the server
})

You can use the same pattern for viewing the avatar (AvatarContextMenuTarget)