The Text in the UI won't change, this only happened when I added anything to do with Regiment, before that The Username would show up, Any help?
local Groupservice = game:GetService("GroupService")
local Groups = {
"9337585",
"9337510",
"9337562",
"9337514",
"9337548",
}
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
local GroupID = "9275037"
local GuiClone = script.BillboardGui:Clone()
GuiClone.Parent = Character:WaitForChild("Head")
local TextLabel = GuiClone.Frame.TextLabel
local GroupRank = Player:GetRoleInGroup(GroupID)
local function FindRegimentGroup()
for i, id in pairs(Groups) do
local InRegiment = Player:IsInGroup(id)
if InRegiment then
local GroupRegimentRank = Player:GetRoleInGroup(id)
return id
end
end
FindRegimentGroup()
local Regiment = Player:GetRoleInGroup(FindRegimentGroup())
if GroupRank and Regiment then
TextLabel.Text = Player.Name.."\n"..GroupRank.."\n"..Regiment
elseif not GroupRank and not Regiment then
TextLabel.Text = Player.Name.."\nGuest"
elseif GroupRank and not Regiment then
TextLabel.Text = Player.Name.."\n"..GroupRank.."\nRegimental Recruitment"
end
end
end)
end)
