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

How do i stop the nametags from overlapping?

I tried some ways but i can't figure it out, please help, and always on top is on.

local billboardgui = game:GetService("ServerStorage"):WaitForChild("BillboardGui")

game.Players.PlayerAdded:Connect(function(player)
	
	player.CharacterAdded:Connect(function(character)
		local clonedgui = billboardgui:Clone()
		clonedgui.TextLabel.Text = "Player"
		clonedgui.TextLabel.TextColor3 = Color3.fromRGB(36,154,136)
		clonedgui.Parent = game.Workspace:WaitForChild(player.Name).Head
		
		while true do
			wait()
			if player.Name == "ivan6361" then
				local clonedgui = billboardgui:Clone()
				clonedgui.TextLabel.Text = "Owner(coder)"
				clonedgui.TextLabel.TextColor3 = Color3.fromRGB(36,154,136)
				clonedgui.Parent = game.Workspace:WaitForChild(player.Name).Head
			end
		end
	end)
end)

1 answer

local billboardgui = game:GetService("ServerStorage"):WaitForChild("BillboardGui")

game.Players.PlayerAdded:Connect(function(player)

    player.CharacterAdded:Connect(function(character)
	if player.Name == "e" then
		
        local clonedgui = billboardgui:Clone()
        clonedgui.TextLabel.Text = "Owner(coder)"
        clonedgui.TextLabel.TextColor3 = Color3.fromRGB(36,154,136)
        clonedgui.Parent = game.Workspace:WaitForChild(player.Name).Head
		else
		
 	local clonedgui = billboardgui:Clone()
        clonedgui.TextLabel.Text = "Player"
        clonedgui.TextLabel.TextColor3 = Color3.fromRGB(36,154,136)
        clonedgui.Parent = game.Workspace:WaitForChild(player.Name).Head
            end
       end)
end)

Should work. Replace "e" with specified name.

2 comments

0

Yas tysm

0

Should have said this before, but you can do 'or "other dev name here" or "another name' to add more developers in the if statement.

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