Help on a command that gives some one a name

I am trying to make a command, that is like “:Authorize” someone, and when a certain rank in the group says it, then the user they said would have a big nametag called “Authorized” The one thing I don’t know how to do, is the nametag. Which bothers me cause it’s so easy.

Script I have so far:

	plr.Chatted:Connect(function(msg)
		local message = string.sub(msg, 1, 9)
		if message == ":Authorize" then return end
		local player_name = string.sub(msg, 9, #msg)
		print(player_name)
		assert(game.Players:FindFirstChild(player_name))
			local player = game.Players:FindFirstChild(player_name)
			local char = player.Character or player.CharacterAdded:Wait()```


I don't know how I would add like a title.

Use BillboardGui and set the Adornee property to the player’s head

Create a billboardGui with frame and text:
image

and just clone it to the player’s head.

game.Players.PlayerAdded:Connect(function(plr)
	plr.Chatted:Connect(function(msg)
		local message = string.sub(msg, 1, 9)
		if message == ":Authorize" then return end
		local player_name = string.sub(msg, 9, #msg)
		local player = game.Players:FindFirstChild(player_name)
		local char = player.Character or player.CharacterAdded:Wait()

		local clone = script.BillboardGui:Clone()
		clone.Parent = game.Workspace:WaitForChild(player.Name).Head
		clone.Frame.Rank.Text = "Authorized"
		wait(1) -- however many seconds you want to show "authorized" for.
		clone:Destroy() -- destroy the authorized
	end)
end)

Sorry to ask this, cause I am a new scripter. But I don’t understand the differences between stuff like Serverscript storage, Server Storage, and stuff like that. Can you please explain to me what they are used for? And the differences.

ServerScriptService is geenerally used to hold server scripts, or just Script
ServerStorage contains things that you want to clone into workspace, or anything you don’t want the client to see.

Oh, I see. Thank you! I appreciate it.

I assume you mean this script.
In that case, the script should go in ServerScriptService and the BillboardGui should be under the script

Sorry, I messed up the script a little.

Yes, and nvm. Sorry. I have a huge headache this morning. I am sick, and just feeling horrible.

What do you mean by under it? I tried everything, I tried it with the BillBoard being in the script, both script, and Billboard GUI in serverscript GUI but it still won’t work. I know I am wasting your time, but I just dont’ understand.

I am just going to try again when I am feeling better. Thank you for the help.

I’m back, my head ache is kind of gone. But it’s either I have no idea where to put it, and the other guy told me the wrong thing. Or it just doesn’t work.
Photos:

You could also change the player’s display name

"Authorized "..player.Name

Although, this doesn’t look as fancy, so all power to you.

What do you mean by this? Change the players display name? Or make it so it finds the player even with the display name?

Actually bad idea, people could just change their display name and include “Authorized”. Forget about that.

Is there anything else I could do to make it work? I am personally running out of ideas.

Like others have said, a Billboard GUI is good enough, parent it to the head of the character.UI.rbxm (4.6 KB)

Since it’s something that needs to replicate for everyone, the code for the UI will happen on the server.

local BillUI = game.ServerStorage.AuthorizedGUI:Clone()
BillUI.Parent = Character.Head