Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can I make this include a tag?

So I basically want it to be able to automatically add the rank and I'd manually add the groups as seen below.

http://gyazo.com/a85db0100188f020fbb0b95bd1e3e44f

If anyone could help me out with what is wrong with this, that would be very helpful! :)

if Player:IsInGroup(2535914) then
	newName.Name = "[LEGV][" .. Player:RoleInGroup(2535914) .. "] "and  .. Player.Name

1 answer

  1. You need an "end"
  2. Who is "Player"?
  3. What is "newName"?
  4. 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 --What is "new name?"
	end
end)

Try this with a function:

function newName(StatName, char) --Edit this part.
	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

0

The part that says "Edit this part" you need to edit because the name will not be in the center of the player.

This discussion is preserved as it was. New answers, comments, and votes are closed.