Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i stop the nametags from overlapping?

Asked by 4 years ago

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

Log in to vote
1
Answered by 4 years ago
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.

0
Yas tysm ivan6361 34 — 4y
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. DejaSketch 84 — 4y
Ad

Answer this question