local User = script:WaitForChild("Username")
local Player = game.Players.LocalPlayer
local Rank = script:WaitForChild("Rank")
local Regiment = script:WaitForChild("Regiment")
game.Players.PlayerAdded:connect(function(Player)
Player.CharacterAdded:connect(function(Character)
spawn(function()
wait()
local c = User:clone()
local a = Rank:clone()
local b = Regiment:clone()
a.Adornee = Character:WaitForChild("Head")
a.TextLabel.Text = Player:GetRoleInGroup(GroupID)
a.Enabled = true
a.Parent = Character
b.Adornee = Character:WaitForChild("Head")
local regimentIDs = {RegimentID}
for i,regimentID in pairs(regimentIDs) do
if Player:IsInGroup(regimentID) then
b.TextLabel.Text = Player:GetRoleInGroup(regimentID)
end
end
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
h.Transparency = 1
h:WaitForChild('face'):Destroy()
Character.Head.Transparency = 0
local w = Instance.new('Weld',Character.Head)
w.Part0, w.Part1 = Character.Head, h
a.StudsOffset = Vector3.new(0, 1.8, 0)
b.StudsOffset = Vector3.new(0, 1.3, 0)
c.StudsOffset = Vector3.new(0, 2.55, 0)
end)
end)
end)
The ID's I have filled in just not exposing them to everyone. I was thinking it was due to the order of the functions, but have had no luck.

1 comment
i think getroleingroup updates on every new server