I’m currently working on a feature for a project which requires the Username of a Player to appear in a BillboardGui.
Example:
A player would click a button (using a ClickDetector). Upon doing this the username of the player who clicked the button would appear as the Text in a BillboardGui.
local ClickDetector = script.Parent
ClickDetector.MouseClick:Connect(function()
???
end)
Does anyone know how I would make the Player’s username display in the BillboardGui?
Some thing like this would work. You can change stuff like the billboard gui offset in the billboard gui properties to make it slightly above the players head
local ClickDetector = script.Parent
ClickDetector.MouseClick:Connect(function(player)
local billboardGui = script.BillboardGui -- Change to the location of the billboard gui
billboardGui.TextLabel.Text = player.Name
billboardGui.Parent = player.Character.Head
end)