Hi,
I’m trying to do the following:
When a user clicks on another a “billboard menu” will appear on that clicked user. The billboard is clickable, if the user clicks on another thing the billboard disappears…
I have a billboard menu template in ReplicatedStorage which is a Billboard and a button.
When the users clicks on the user the billboard clones on StarterGUI and links the adornee to the head of the clicked user… however is not seen on the screen.
Here’s my code:
mouse.Button1Down:Connect(function()
local model = mouse.Target:FindFirstAncestorOfClass('Model')
if model then
local clickedPlayer = game.Players:GetPlayerFromCharacter(model)
if clickedPlayer then
print(clickedPlayer) -- this is done!
clonarTest(clickedPlayer)
end
end
end)
local function clonarTest(player)
-- Obtén el Folder en ServerStorage que contiene el Frame
local folderGUI = game.ReplicatedStorage:WaitForChild("GUI")
-- Obtén el objeto Frame de ServerStorage
local billboard = folderGUI:WaitForChild("Test")
local player_head = player.Character:WaitForChild("Head")
-- Clona el objeto Frame
local clonedBillboard = billboard:Clone()
-- Coloca el clonado en el StarterGUI
clonedBillboard.Parent = game:GetService("StarterGui")
clonedBillboard.Adornee = player_head
end
You’re putting the “clonedBillboard” inside of StarterGui. Keep in mind that you want the billboardGUI to show up on top of the Player’s head (and billboardGuis only show when they’re a child or descendant of workspace).
Instead, you should parent clonedBillboard to the Player’s head.
Also, if you’re ever putting a textlabel (etc), keep in mind that after a Player is loaded in; anything you put in StarterGui will not show up on their screen and you have to put it in their PlayerGui for it to show up on their screen.