I have a nametag handler for a group but I want to make the border change colors how do I do that?
function Create(ClassName) return function(Properties) local Obj = Instance.new(ClassName) for i,v in pairs(Properties) do if type(i) == 'number' then v.Parent = Obj else Obj[i] = v end end return Obj end end function HandleCharacter(Player, Character) local FakeHead = Character:WaitForChild('Head'):clone() FakeHead.Name = 'FakeKestrelHead' FakeHead.Parent = Character FakeHead.face:Destroy() Character.Head.Transparency = 1 Create'Weld'{ Name = 'FakeHeadWeld'; Parent = FakeHead; Part0 = Character.Head; Part1 = FakeHead; } Create'BillboardGui'{ Name = 'Nametag'; Parent = FakeHead; Size = UDim2.new(5, 0, 0.5, 0); StudsOffset = Vector3.new(0, 2, 0); ----- Create'TextLabel'{ Name = 'NameLabel'; BackgroundTransparency = 1; Size = UDim2.new(1, 0, 1, 0); Font = 'SourceSans'; Text = Character.Name .. ', ' .. Player:GetRoleInGroup(3034207); TextColor3 = Color3.new(1, 1, 1); TextScaled = true; TextStrokeTransparency = 0.5; }; } FakeHead.BrickColor = Character.Head.BrickColor Character.Head.Changed:connect(function() Character.Head.Transparency = 1 FakeHead.BrickColor = Character.Head.BrickColor end) Character.Head.Mesh.Changed:connect(function() FakeHead:WaitForChild('Mesh').MeshId = Character.Head:WaitForChild('Mesh').MeshId end) end function HandlePlayer(Player) if Player.Character then HandleCharacter(Player, Player.Character) end Player.CharacterAdded:connect(function(Character) HandleCharacter(Player, Character) end) end game.Players.PlayerAdded:connect(HandlePlayer) for i,v in pairs(game.Players:GetPlayers()) do HandlePlayer(v) end
First, you would have to make sure the border is visible
button.BorderSizePixel = 1 --Can really change this to anything other than 0
Then apply the color.
button.BorderColor3 = Color3.new(1, 1, 1) --Anything here as well