Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 2 years ago
Edited 2 years ago

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

Log in to vote
0
Answered by
Puppynniko 1059 Moderation Voter
2 years ago
Edited 2 years ago

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)
Ad

Answer this question