How to make nametag system!
Hold on, if you dont wanna follow the tutorial, you can simply download the model by clicking here.
1. Make a new BillaboardGui in workspace
Once you done making the BillaboardGui, name it “NameTag”
2. Make 2 TextLabels, 1 upper text and one lower text.
The upper text will be the player name and the lower case will be the player rank
Once you done, desgin them however you want.
3. Move the BillaboardGui to ReplicatedStorage | game.ReplicatedStorage
4. Make a new script in ServerScriptService and script it!
game.Players.PlayerAdded:Connect(function(plr) -- Detects a new player that joins
plr.CharacterAdded:Connect(function(char)
local Nametag = game.ReplicatedStorage:WaitForChild("NameTag") -- Our nametag
local clone = game.ReplicatedStorage:WaitForChild("NameTag"):Clone() -- Clones the nametag
clone.Parent = char.Head -- Put the cloned nametag on the character head
local UpperText = char.Head.NameTag.UpperText
local LowerText = char.Head.NameTag.LowerText
UpperText.Text = plr.Name -- Makes the upper text the player name
local owners = {123,1234,12345} -- Owners list, you can add someone by adding a comma(,)
for i,v in pairs(owners) do -- Checks the table
if v == plr.UserId then -- Checks if there is a user ID in the table
LowerText.Text = "Owner" -- The lower text will be owner and everyone will be able to see it
LowerText.TextColor3 = Color3.new(1, 0.85098, 0) -- Changing the text color to yellow
end
end
--[[local admins = {123,1234,12345}
for i,v in pairs(admins) do
if v == plr.UserId then
LowerText.Text = "Admin"
LowerText.TextColor3 = Color3.new(1, 0, 0.0156863)
end
end--]]
end)
end)
*If you need any help feel free to reply! - Thanks for reading
sorry if I forgot anything or explained bad, its just 3 AM for me, if you didnt understand anything feel free to reply