Hi! i’ve made this overhead script with all group ranks, and it works, but idk why it will only insert it on my charachter and not on the other else, there isn’t any correlation with my user, so strange
--Variables
local players = game:GetService("Players")
local SS = game:GetService("ServerStorage")
local nametag = SS:WaitForChild("NameTag")
local idGroup = 15428405
--Table for special names
local Roles = {
["255"] = {title = "Holder", color = Color3.fromRGB(2, 0, 39), mod = true, admin = true, owner = true},
["254"] = {title = "Creatore", color = Color3.fromRGB(2, 0, 39), mod = true, admin = true, owner = true},
["240"] = {title = "CapoAdmin", color = Color3.fromRGB(41, 8, 138), mod = true, admin = true, owner = false},
["230"] = {title = "ViceCapoAdmin", color = Color3.fromRGB(7, 57, 111), mod = true, admin = true, owner = false},
["220"] = {title = "Admin", color = Color3.fromRGB(27, 134, 206), mod = true, admin = true, owner = false},
["215"] = {title = "Capo Moderatore", color = Color3.fromRGB(98, 0, 0), mod = true, admin = false, owner = false},
["212"] = {title = "ViceCapo Moderatore", color = Color3.fromRGB(98, 0, 0), mod = true, admin = false, owner = false},
["200"] = {title = "Senior Moderatore", color = Color3.fromRGB(117, 0, 0), mod = true, admin = false, owner = false},
["114"] = {title = "Moderatore", color = Color3.fromRGB(138, 3, 3), mod = true, admin = false, owner = false},
["110"] = {title = "Junior Moderatore", color = Color3.fromRGB(171, 48, 32), mod = true, admin = false, owner = false},
["100"] = {title = "Trial Moderatore", color = Color3.fromRGB(171, 73, 43), mod = true, admin = false, owner = false},
["1"] = {title = "Membro", color = Color3.fromRGB(159, 135, 58), mod = false, admin = false, owner = false},
["0"] = {title = "Guest", color = Color3.fromRGB(131, 113, 48), mod = false, admin = false, owner = false}
}
--Functions
local function addOverhead(player)
local char = player.Character
if char then
local head = char:WaitForChild("Head")
local newtext = nametag:Clone() --Cloning the text.
local mainFrame = newtext.Frame.Frame
local visualName = mainFrame.DisplayName
local visualNameShadow = mainFrame.DisplayNameShadow
local nametext = mainFrame.PlayerName
local nametextShadow = mainFrame.PlayerNameShadow
local ranktext = mainFrame.Rank
local Icons = mainFrame.Icons
local AdminIcon = Icons.Admin
local OwnerIcon = Icons.Owner
local PremiumIcon = Icons.Premium
local ModIcon = Icons.Mod
local humanoid = char.Humanoid
local userId = player.UserId
local rankGroup = player:GetRankInGroup(idGroup)
humanoid.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
--Main Text
newtext.Parent = head
newtext.Adornee = head
nametext.Text = player.Name --Changes the text to the player's name.
nametextShadow.Text = player.Name
visualName.Text = player.DisplayName
visualNameShadow.Text = player.DisplayName
--"If" Statements
--Check if player name is in the specialNames table
if player.MembershipType == Enum.MembershipType.Premium then
PremiumIcon.Visible = true
end
ranktext.Text = Roles[tostring(rankGroup)].title
ranktext.TextColor3 = Roles[tostring(rankGroup)].color
AdminIcon.Visible = Roles[tostring(rankGroup)].admin
ModIcon.Visible = Roles[tostring(rankGroup)].mod
OwnerIcon.Visible = Roles[tostring(rankGroup)].owner
end
end
for _, player in pairs(players:GetPlayers()) do
addOverhead(player)
end
players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
addOverhead(player)
end)
end)
Any Help?