the code gives the players main group rank and name but regiments text wont change?
local User = script:WaitForChild("Username")
local Rank = script:WaitForChild("Rank")
local Regiment = script:WaitForChild("Regiment")
game.Players.PlayerAdded:connect(function(Player)
Player.CharacterAdded:connect(function(Character)
spawn(function()
wait(.8)
local c = User:clone()
local a = Rank:clone()
local b = Regiment:clone()
a.Adornee = Character:WaitForChild("Head")
a.TextLabel.Text = Player:GetRoleInGroup(6254193)
a.Enabled = true
a.Parent = Character
b.Adornee = Character:WaitForChild("Head")
b.TextLabel.Text = Player:GetRoleInGroup(14097877,13221656,13407884,13722215,13554429,13554696,13864162) -- regiments
print("regiment worked")
b.TextLabel.TextColor3 = (Player.TeamColor.Color)
b.Enabled = true
b.Parent = Character
c.Adornee = Character:WaitForChild("Head")
c.TextLabel.TextColor3 = (Player.TeamColor.Color)
c.TextLabel.Text = Player.Name
c.Enabled = true
c.Parent = Character
Character:WaitForChild('Humanoid').NameOcclusion = Enum.NameOcclusion.OccludeAll
local h = Character.Head:Clone()
local m = Instance.new('Model',Character)
m.Name = 'NameTag'
h.Parent = m
Character.Head:WaitForChild('face'):Destroy()
Character.Head.Transparency = 1
local w = Instance.new('Weld',Character.Head)
w.Part0, w.Part1 = Character.Head, h
end)
end)
end)