How do I make a persons chat there team color?
Okay so say I have this:
01 | function UpdateOldLabels(Parent) |
02 | for i,v in pairs (Parent:GetChildren()) do |
03 | if v.Name:sub( 1 , 4 ):lower() = = "line" then |
04 | local LineNumber = v.Name:sub( 5 ) |
05 | if LineNumber = = "12" then |
08 | v.Name = "line" .. tostring ( tonumber (LineNumber) + 1 ) |
09 | v.Position = v.Position - UDim 2. new( 0 , 0 , 0 , 15 ) |
15 | game:GetService( "Players" ).PlayerAdded:connect( function (player) |
16 | player.Chatted:connect( function (msg) |
17 | for _,v in ipairs (game:GetService( "Players" ):GetChildren()) do |
18 | UpdateOldLabels(v:WaitForChild( "PlayerGui" ).ChatGui.Frame) |
19 | newchatline = Instance.new( "TextLabel" ,v:WaitForChild( "PlayerGui" ).ChatGui.Frame) |
20 | newchatline.Text = player.Name = = 'EmperorF' and ( "[OWNER] " ..player.Name.. ": " ..msg) or (player.Name.. ": " ..msg) |
21 | newchatline.Size = UDim 2. new( 1 , 0 , 0 , 15 ) |
22 | newchatline.Position = UDim 2. new( 0 , 0 , 1 ,- 15 ) |
23 | newchatline.Font = "SourceSansBold" |
24 | newchatline.TextColor 3 = player.Name = = "EmperorF" and BrickColor.new( "Bright red" ).Color or BrickColor.new( "Bright blue" ).Color |
25 | newchatline.TextStrokeTransparency = 0 |
26 | newchatline.BackgroundTransparency = 1 |
27 | newchatline.BorderSizePixel = 0 |
28 | newchatline.FontSize = "Size14" |
29 | newchatline.TextXAlignment = "Left" |
30 | newchatline.TextYAlignment = "Top" |
31 | newchatline.ClipsDescendants = true |
32 | newchatline.Name = "line1" |
34 | UpdateOldLabels(game:GetService( "StarterGui" ).ChatGui.Frame) |
35 | newchatline:Clone().Parent = game:GetService( "StarterGui" ).ChatGui.Frame |
Does line 24:
1 | newchatline.TextColor 3 = player.Name = = "EmperorF" and BrickColor.new( "Bright red" ).Color or BrickColor.new( "Bright blue" ).Color |
Get changed to this?:
1 | newchatline.TextColor 3 = player.Name = = "EmperorF" and BrickColor.new( "Bright red" ).Color or BrickColor.new.TeamColor.Color |
I dont know if it will work or not or if it will break down my game