it could be done this way
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
local function typeWrite(textbox, text)
for i=1,#text,1 do
textbox.Text = string.sub(text,1,i)
wait(0.1)
end
end
local plrtag = script.NameGui:Clone()
plrtag.Parent = char:WaitForChild('Head')
plrtag.overhead.UserName.Text = string.upper(plr.Name)
while wait() do
for _, IntValue in pairs(script.SettingsContainer.Configuration.Groups:GetChildren()) do
if IntValue:IsA("IntValue") then
typeWrite(plrtag.overhead.Division, tostring(string.upper(plr:GetRoleInGroup(9536284)))
wait(1)
typeWrite(plrtag.overhead.Division, tostring(string.upper(IntValue.RegimentName.Value)))
wait(1)
typeWrite(plrtag.overhead.Division, tostring(string.upper(plr:GetRoleInGroup(IntValue.Value)))
end
end
end
end)
end)