How to make group name handler border change colors?
Asked by
8 years ago Edited 8 years ago
I have a nametag handler for a group but I want to make the border change colors how do I do that?
01 | function Create(ClassName) |
02 | return function (Properties) |
03 | local Obj = Instance.new(ClassName) |
05 | for i,v in pairs (Properties) do |
06 | if type (i) = = 'number' then |
17 | function HandleCharacter(Player, Character) |
18 | local FakeHead = Character:WaitForChild( 'Head' ):clone() |
20 | FakeHead.Name = 'FakeKestrelHead' |
21 | FakeHead.Parent = Character |
22 | FakeHead.face:Destroy() |
23 | Character.Head.Transparency = 1 |
26 | Name = 'FakeHeadWeld' ; |
28 | Part 0 = Character.Head; |
34 | Size = UDim 2. new( 5 , 0 , 0.5 , 0 ); |
35 | StudsOffset = Vector 3. new( 0 , 2 , 0 ); |
39 | BackgroundTransparency = 1 ; |
40 | Size = UDim 2. new( 1 , 0 , 1 , 0 ); |
42 | Text = Character.Name .. ', ' .. Player:GetRoleInGroup( 3034207 ); |
43 | TextColor 3 = Color 3. new( 1 , 1 , 1 ); |
45 | TextStrokeTransparency = 0.5 ; |
49 | FakeHead.BrickColor = Character.Head.BrickColor |
51 | Character.Head.Changed:connect( function () |
52 | Character.Head.Transparency = 1 |
53 | FakeHead.BrickColor = Character.Head.BrickColor |
55 | Character.Head.Mesh.Changed:connect( function () |
56 | FakeHead:WaitForChild( 'Mesh' ).MeshId = Character.Head:WaitForChild( 'Mesh' ).MeshId |
60 | function HandlePlayer(Player) |
61 | if Player.Character then |
62 | HandleCharacter(Player, Player.Character) |
64 | Player.CharacterAdded:connect( function (Character) HandleCharacter(Player, Character) end ) |
67 | game.Players.PlayerAdded:connect(HandlePlayer) |
68 | for i,v in pairs (game.Players:GetPlayers()) do HandlePlayer(v) end |