Hi Guys, so I tried to make a script that clones a BillboardGUI that shows the rank of the player (Developer, Owner etc.), and it clones properly, but for some reason it doesn’t show and not even there inside the Head but it prints the name.
Script -
local tags = {
["Owner"] = game.CreatorId,
["Developers"] = {
"3012757578",
}
}
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
if player.UserId == game.CreatorId then
local rank_gui = game.ServerStorage.HeadRank:Clone()
local head = char:FindFirstChild("Head")
rank_gui.Rank.Text = "Owner"
rank_gui.Parent = head
end
if table.find(tags.Developers, tostring(player.UserId)) then
local rank_gui = game.ServerStorage.HeadRank:Clone()
local head = char.Head
rank_gui.Rank.Text = "Developer"
rank_gui.Parent = head
print(head.HeadRank.Rank.Text)
end
end)
end)
i dont see any line with Adornee property set anyway so im assuming you forgot to set it’s Adornee, other than that the code looks fine except missing what i expected
Billboards dont automatically appear nor assign it when parented, BillboardGui displays if you set it’s Adornee to somewhere you want
local NewTagCopy = PlayerTag:Clone()
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
NewTagCopy.Frame.Rank.Text = player.Team.Name
NewTagCopy.Frame.PlayerName.Text = "@" .. player.Name
NewTagCopy.Parent = character
Perhaps it looks like some checking CreatorId???, If the game is under a group, it will get the group id returned in 6 digits, if its owned by a user it will be the same as UserId
then i suggest trying to put another if statement inside the first one like what the guy said, normally when checking stuff, we have the elseif statement to let it check the condition
local tags = {
["Owner"] = game.CreatorId,
["Developers"] = {
"3012757578",
}
}
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
if player.UserId == game.CreatorId then
local rank_gui = game.ServerStorage.HeadRank:Clone()
local head = char:FindFirstChild("Head")
rank_gui.Rank.Text = "Owner"
rank_gui.Parent = head
elseif table.find(tags.Developers, tostring(player.UserId)) then
local rank_gui = game.ServerStorage.HeadRank:Clone()
local head = char.Head
rank_gui.Rank.Text = "Developer"
rank_gui.Parent = head
print(head.HeadRank.Rank.Text)
end
end)
end)