How to make bilboard gui pop up when player is clicked?

hey, i want to make a bilboard gui pop up whenever i click a player or myself, like in bloxburg/brookheaven
Screenshot_5
but i dont know how to make the bilboard show up specifcly whenever the player/myself is clicked.
like how would i detect the player?

Make a billboard gui and parent it to the humanoidrootpart and make the main button used to show all the buttons, something like this:

local Gui = --Gui

game.Players.PlayerAdded:Connect(function(plr)
local Character = plr.Character or plr.CharacterAdded:Wait()

Gui:Clone().Parent = Character:WaitForChild("HumanoidRootPart")
end)

And just program the logic for the buttons inside the billboard gui locally.