Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make a nametag that switches between division name and Rank?

I have a Navy. I have divisions such as Naval Criminal Investigation Services. I want a nametag, that has the name, Rank within the Navy, Then after 5-10 Seconds it switches from rank to Division Name and Division Rank. I am not that talented with scripting so I am seeking help. This nametag cannot disturb the bubble chat though. The rank of the person for Navy Rank is in 1 Group and the Division Name/Rank is in another Roblox group. By the way, I need a nametag to change its color based on which division they are in

1 answer

✓ Accepted answer

this is the most simplest i can give

local Group = 2
local Values = {
    ["Owner"] = {
       Color = Color.FromRgb(1,1,1) --White
   },
   ["Guest"] = {
      Color = Color.FromRgb(0,0,0) --Black,
   }
}
game.Players.PlayerAdded:Connect(function(player)
    --Do namtag stuff
      local Role = player:GetRoleInGroup(Group) --Returns a String
      NameTag.Rank.Color = Values[Role].Color --find the role Color
      NameTag.Rank.Text = Role
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.