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

How to set custom chat text color to team color?[solved]

Asked by
AZDev 590 Moderation Voter
8 years ago
local chatFrame = script.Parent.Frame


game.ReplicatedStorage.SendMessages.OnClientEvent:connect(function(messages)

chatFrame:ClearAllChildren()    


for i, message in pairs(messages) do
    local newLine = Instance.new("TextLabel", chatFrame)
        newLine.Text = message  
        newLine.Size = UDim2.new(1,0,0,18)
        newLine.TextColor3 = Color3.new(1,1,1)
        newLine.Position = UDim2.new(0,0,0,18*(i-1))
        newLine.TextXAlignment = Enum.TextXAlignment.Left
        newLine.TextYAlignment = Enum.TextYAlignment.Center
        newLine.BackgroundTransparency = 1
        newLine.BorderSizePixel = 0
        newLine.FontSize = Enum.FontSize.Size18
        newLine.Font = Enum.Font.SourceSansBold
    end
end)

Answer this question