-
What do you want to achieve?
Well, I want that everytime an player joins an billboardgui is attached to their head, and also updating the text on the billboard gui on the corresponding thing. -
What is the issue?
Well when the player joins the overheadgui falls and doesnt stay on the character head and isnt updated like it should.

-
What solutions have you tried so far?
I have rewritten the code 3 times, put the billboard gui on the startergui, asked chatgpt but nothing worked.
local NameGUI = game.StarterGui.Nome
local RankGUI = game.StarterGui.Patente
local TeamGUI = game.StarterGui.Time
game.Players.PlayerAdded:Connect(function(Player)
task.wait(4)
local leaderstats = Player:FindFirstChild("leaderstats")
local Rank = leaderstats and leaderstats:FindFirstChild("Rank")
Player.CharacterAdded:Connect(function(Character)
local NewNameGUI = NameGUI:Clone()
local NewRankGUI = RankGUI:Clone()
local NewTeamGUI = TeamGUI:Clone()
NewNameGUI.Name = Player.Name .. " Name"
NewRankGUI.Name = Player.Name .. " Rank"
NewTeamGUI.Name = Player.Name .. " Team"
local Head = Character:WaitForChild("Head")
NewNameGUI.Parent = Head
NewNameGUI.Adornee = Head
NewNameGUI.TextLabel.Text = Player.Name
NewNameGUI.TextLabel.TextColor3 = Color3.new(1, 1, 1)
NewRankGUI.Parent = Head
NewRankGUI.Adornee = Head
NewRankGUI.TextLabel.Text = Rank and Rank.Value or "[NA] No Rank"
NewRankGUI.TextLabel.TextColor3 = Player.TeamColor.Color
NewTeamGUI.Parent = Head
NewTeamGUI.Adornee = Head
if Player.Team then
NewTeamGUI.TextLabel.Text = Player.Team.Name
NewTeamGUI.TextLabel.TextColor3 = Player.TeamColor.Color
else
NewTeamGUI.TextLabel.Text = "No Team"
NewTeamGUI.TextLabel.TextColor3 = Color3.new(1, 1, 1)
end
if Rank then
Rank.Changed:Connect(function(newValue)
NewRankGUI.TextLabel.Text = newValue
end)
end
Character.Humanoid.Died:Connect(function()
NewRankGUI.TextLabel.Text = Rank and Rank.Value or "[NA] No Rank"
end)
end)
end)

