- You need an "end"
- Who is "Player"?
- What is "newName"?
- Why does it have an "and" when it there isn't even an if statement on line 2.
game.Players.PlayerAdded:connect(function(Player)
if Player:IsInGroup(2535914) then
newName.Name = "[LEGV][" .. Player:RoleInGroup(2535914) .. "] ".. Player.Name
end
end)
Try this with a function:
function newName(StatName, char)
local billboard = Instance.new("BillboardGui", char)
local name = Instance.new("TextLabel", billboard)
name.BackgroundTransparency = 1
billboard.Size = UDim2.new(0,1,0,1)
name.Text = StatName
end
game.Players.PlayerAdded:connect(function(Player)
if Player:IsInGroup(2535914) then
Player.NameDisplayDistance = 0
newName("[LEGV]["..Player:RoleInGroup(2535914).."]"..Player.Name, Player.Character)
end
end)
Hope this helps. You had a lot of errors.
1 comment
The part that says "Edit this part" you need to edit because the name will not be in the center of the player.