Hello! Can someone help me with this script? It is not appearing above my head at all. I don’t know what is wrong with it. Here is the way my Nametag is laid out. https://hcpefuls.is-ne.at/5iEapdi8p
Here is my script in Server Script Service.
game.Players.PlayerAdded:Connect(function(player)
local groupid = 11892016
local ServerStorage = game:GetService(“ServerStorage”)
local x = ServerStorage:WaitForChild(“NameTag”)
local billboardui = x:Clone()
local MRicon = billboardui:WaitForChild(“Frame”):WaitForChild(“Badges”):WaitForChild(“HighRank”)
local username = billboardui:WaitForChild(“Frame”):WaitForChild(“PlayerName”)
local rank = billboardui:WaitForChild(“Frame”):WaitForChild(“Rank”)
player.CharacterAdded:Connect(function(Character)
username.Text = string.upper(player.Name)
rank.Text = player:GetRoleInGroup(groupid)
billboardui.Parent = workspace:WaitForChild(player.Name).Head
if player:GetroleInGroup(groupid) >= 246 then
MRicon.Visible = true
end
end)
local groupid = 11892016
local ServerStorage = game:GetService("ServerStorage")
local x = ServerStorage:WaitForChild("NameTag")
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(Character)
local billboardui = x:Clone()
local MRicon = billboardui:WaitForChild("Frame"):WaitForChild("Badges"):WaitForChild("HighRank")
local username = billboardui:WaitForChild("Frame"):WaitForChild("PlayerName")
local rank = billboardui:WaitForChild("Frame"):WaitForChild("Rank")
username.Text = string.upper(player.Name)
rank.Text = player:GetRoleInGroup(groupid)
billboardui.Parent = workspace:WaitForChild(player.Name).Head
if player:GetRoleInGroup(groupid) >= 246 then
MRicon.Visible = true
end
end)
end)
The only things I really see, is that you put GetroleInGroup instead of GetRoleInGroup() for 1 of your functions (Lua is case-sensitive) & there could be the possible chance that rank.Text could be equal to nil if that player isn’t exactly in the Group so you might wanna check first if they’re in the group before giving them the actual NameTag
Otherwise, do check your Output (Which is located within Studio > View > Output) for errors inside your script
So what the script is attempting to check for, is an object that’s named HighRank but provided by the image you provided us, it’s still resulting back as a infinite yield as there’s no such thing inside the Frame.Badges Object (Or put simply):
NameTag Object (ServerStorage > NameTag)
The NameTag’s Frame (NameTag > Frame)
The Frame’s Badges (Frame > Badges)
The Badge’s HighRank (Badges > HighRank), which is unable to be found unless named properly
I fixed it so that I re-named HighRank to MRicon, but now when I test it out, my nametag and rank do not appear, but the icon does. However the icon looks like this. https://hcpefuls.is-ne.at/5iEeFkMr9
Did you set the Icon of the Staff object, and changed the size of the UI Objects? That’s prob the only think I can think of if you didn’t do that already