The script works fine for players who are in the group, but players who are not in the group...the gui doesnt even appear. No errors at all.
function plrjoined(plr)
plr.CharacterAdded:connect(function(char)
local Rank = plr:GetRankInGroup(3569513)
local Role = plr:GetRoleInGroup(3569513)
local GUI = script.BillboardGui
if plr:IsInGroup(3569513) then
GUI:Clone().Parent = char.Head
local playerGUI = char.Head.BillboardGui
playerGUI.GUINAME.Text = plr.Name .. "|" .. Role
playerGUI.GUINAME.TextColor = plr.TeamColor
playerGUI.Adornee = char.Head
if not plr:IsInGroup(3569513) then
GUI:Clone().Parent = char.Head
local playerGUI = char.Head.BillboardGui
playerGUI.GUINAME.Text = plr.Name .. "|C-" .. math.random(10000,90000)
playerGUI.GUINAME.TextColor = plr.TeamColor
playerGUI.Adornee = char.Head
end
end
end)
end
game.Players.ChildAdded:connect(plrjoined)

1 comment
line 12 to an else statement