[CLOSED] Nametag Assistance

Details:
I want to make a nametag for my Army that looks like the following:
NavalFreezing, President of the United States
[OCS] - [FA] - [ASF]
Or something near like that.
I also want it to be able to customize how the ranks are inputted, for example like a table. But also to be able to put what divisions go onto the nametag.

Anybody know how to do this? Drop down a script or tutorial. And also to clarify I don’t mean a nametag that only projects 1 group. I’m talking about a nametag that projects many groups.

There’s a few things in this tutorial I would personally do differently, but this should be a good starting point:

1st, this isn’t a place for people to give you code this is a place for people to help you code. Secondly, I am still new to scripting but personally I think the way I would do this is just use modules to relay the groups and their ranks, then use a main script to figure out what groups they are in and display the group they have the highest rank in.

once again i am not a professional scripter.

i made a tutuorial on how to make one 4 months ago, u should check it out;

model;
https://www.roblox.com/library/6657186017/nameTag-Script

image

1 Like

Create a BillboardGui, call it “OverheadUI” or something.

Create an UI and add the text labels for name, display name, etc, whatever you want.

Store it on ServerStorage somewhere.

Have a script, inside this script you will have a table which is an array with other tables which are dictionaries inside them, something like this:

local Ranks = {
    {
        Color = Color3.fromRGB(175, 0, 255),
        AllowedUserIds = {123456679}
    }
}

Handle the code for player joining and .CharacterAdded.

Inside the OnCharacterAdded handler, you will have to get the rank that person belongs to.
You do that this way:

local rank = nil
for _, rankData in ipairs(Ranks) do
    if table.find(rankData.AllowedUserIds, player.UserId) then
        rank = rankData
    end
end

if rank == nil then
    -- No specific rank found:

    rank = Ranks[#Ranks]
    -- Get last rank on the list
end

Afterwards it’s just a question of applying whatever properties you have,
Now you need to parent it to character’s head and you’re done!

You can add more dynamic rank detection like detecting if someone is inside a group or has a game pass by having a function to handle it inside each rank, I don’t think that’s hard to explain so you should be able to figure that out pretty easily.