Custom Nametag Colors - Not Working

Uh-oh. I am sorry but i can not figure out the solution :sleepy:, but I hope someone else does!!!

Its ok, thanks for trying! It was very helpful for you to at least try! Have a nice rest of your weekend! -ItsKoolPlayz

1 Like

I just tried it in the studio and it worked but I changed it a bit.

local TweenService = game:GetService(“TweenService”)
local MarketplaceService = game:GetService(“MarketplaceService”)

local gamePassId = 16996503
local groupId = 9789396

game.Players.PlayerAdded:Connect(function(Player)
    Player.CharacterAdded:Connect(function(Character)
        local GuiClone = script.OverheadGui:Clone()
        GuiClone.Parent = Character.Head
        local InformationLabel = GuiClone.InformationLabel

        local PlayerRank = Player:GetRoleInGroup(groupId)
        InformationLabel.Text = Player.Name .. " - " .. PlayerRank

        local list = {
            Color3.fromRGB(128, 187, 219),
            Color3.fromRGB(255, 89, 89),
            Color3.fromRGB(177, 229, 166),
            Color3.fromRGB(177, 167, 255),
            Color3.fromRGB(255, 152, 220)
        }

        if MarketplaceService:UserOwnsGamePassAsync(Player.UserId, gamePassId) then
            while true do
                local randomColor = list[math.random(1, #list)] 
                local ColorTween = TweenService:Create(InformationLabel, TweenInfo.new(3), {TextColor3 = randomColor})
                ColorTween:Play()
                wait(3)
            end
        end
    end)
end)

I’ll try it out, I’m hoping it works but idk… Did you make the BillboardGui and TextLabel inside of the script?

Are The Name Tags In Rep Storage?

No… Is it supposed to be? :grimacing:

Well, where are they then???

Workspace, inside a folder with all the other scripts.

Well, except for a few. (The ones inside ServerScriptService…)

If you want the nametag on everyone then you should move it in rep storage

It shows on everyone though… :thinking:

Would replicated storage make a difference?

Here i made a model of what i did and you can look at it. Test It If you want.
https://web.roblox.com/library/6729546495/Name-Tag-For-ItsKoolPlayz

Ok, thanks. I will be testing it out!

1 Like

Hopefully It Will Give You An Idea! Make Sure You Look At The Script.

On the nametag i spelled
Worked wrong
it was orked :grin:

I am not sure if it would make a difference. I would need to see how you did it. (Do not need you to)

Insert it into the nametag script and rename it to “OverheadGui”.

This script might work

local TweenService = game:GetService(“TweenService”)
local MarketplaceService = game:GetService(“MarketplaceService”)

local gamePassId = 16996503
local groupId = 9789396

game.Players.PlayerAdded:Connect(function(Player)
    Player.CharacterAdded:Connect(function(Character)
        local GuiClone = script.OverheadGui:Clone()
        GuiClone.Parent = Character.Head
        local InformationLabel = GuiClone.InformationLabel

        local PlayerRank = Player:GetRoleInGroup(groupId)
        InformationLabel.Text = Player.Name .. " - " .. PlayerRank

        local list = {
            Color3.fromRGB(128, 187, 219),
            Color3.fromRGB(255, 89, 89),
            Color3.fromRGB(177, 229, 166),
            Color3.fromRGB(177, 167, 255),
            Color3.fromRGB(255, 152, 220)
        }

        if MarketplaceService:UserOwnsGamePassAsync(Player.UserId, gamePassId) then
            while true do
                local randomColor = list[math.random(1, #list)] 
                local ColorTween = TweenService:Create(InformationLabel, TweenInfo.new(3), {TextColor3 = randomColor})
                ColorTween:Play()
                wait(3)
            end
        end
    end)
end)

@ItsKoolPlayz did this work?
https://web.roblox.com/library/6729546495/Name-Tag-For-ItsKoolPlayz

local TweenService = game:GetService('TweenService')
local MarketplaceService = game:GetService('MarketplaceService')

local list = {
Color3.fromRGB(128, 187, 219),
Color3.fromRGB(255, 89, 89),
Color3.fromRGB(177, 229, 166),
Color3.fromRGB(177, 167, 255),
Color3.fromRGB(255, 152, 220)
}

local gamePassId = 16996503
local groupId = 9789396

local overhead = script:WaitForChild('OverheadGui')

game.Players.PlayerAdded:Connect(function(Player)
    Player.CharacterAdded:Connect(function(Character)
        local Head = Character:WaitForChild('Head')

        local GuiClone = overhead:Clone()
        GuiClone.Parent = Head
        local InformationLabel = GuiClone.InformationLabel

        local PlayerRank = Player:GetRoleInGroup(groupId)
        InformationLabel.Text = Player.Name .. " - " .. PlayerRank

        if MarketplaceService:UserOwnsGamePassAsync(Player.UserId, gamePassId) then
           coroutine.wrap(function() -- so the code doesnt just stop for other players
           while true do
                local randomColor = list[math.random(1, #list)] 
                local ColorTween = TweenService:Create(InformationLabel, TweenInfo.new(3), {TextColor3 = randomColor})
                ColorTween:Play()
                wait(3)
            end
            end)()
        end
    end)
end)
1 Like