I need help making a default staff name tag

Hello, I need help making a staff tag for my staff. Here’s an example.

It has partner but this is a example. It needs to be the default name, but the tag is added to a group with certain ranks, the ranks are: 200, 201, 203, 212, 214, 215 and 255.

If you have any questions, please let me know.

When The Player joins, Have a script check for the group by using something along the lines of GetRoleInGroup or GetRankInGroup

As for the Modification of the Default Name Tag, just change the DisplayName using Humanoid.DisplayName

2 Likes

Can you explain that a little more detail

GetRoleInGroup as far as im aware gives you the Rank Number within the Group the Player is in:

GroupNumber = player:GetRoleInGroup(12345) -- Number

GetRankInGroup should give you name of the Rank, like maybe Owner Developer Admin, if the Player is not in the Group. It will appear as Guest.

Will you make the script, it is on if you say no.

You can easily make the script yourself. All you are doing is checking if the Player was added using game.Players.PlayerAdded and then checking if the Players Character was added using Player.CharacterAdded, then just getting the Data, and applying it with the info I gave.

1 Like

Is this good?

function addtag(Rank, tag)

local player = game.Players.localPlayer

local rank = player:GetRankInGroup(1111111) -- fake
	
	if rank == Rank then
		player.DisplayName = "("..tag..")"
		end
end


addtag(255, "staff")

It’s a good start but as the previous person said, you need to check when the player was added and check when their character was added. You also need to make this a Script and not a LocalScript, as it will not replicate to the server if it’s done on the client.

As for the ranks, I recommend you create a table with each rank’s numbers and their given name. Here’s an example:

local Ranks = {[1] = "Member", [255] = "Owner"}

Below is an idea of what your final script should look like!

local GroupID = 1111111 --The group's ID.
local Ranks = {[1] = "Member", [255] = "Owner"} --Table with stored rank numbers and their given names.

local function AddTag(Player) --Add tag function.
	local Rank = Player:GetRankInGroup(GroupID)
	
	if Ranks[Rank] then --Checks our Ranks table to see there is a custom name for the player's rank number.
		Player.Character:WaitForChild("Humanoid").DisplayName = Ranks[Rank] --Waits for the player's Humanoid to load so we can set it's display name to the rank.
	end
end

game.Players.PlayerAdded:Connect(function(Player) --Connection that fires when a player joins.
	Player.CharacterAdded:Connect(function(Character) --An event that activates every time the player's character has been added.
		AddTag(Player) --Adds the tag to the given player.
	end)
end)
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.