I don’t think you understand what I mean, R, G and B are numbers and I want to concatenate all of these strings and it works the only things is that the "]" doesn’t appear in the text for some reason !
Ok but I don’t think that will show you something revelant :
BackgroundColor3TextBox.FocusLost:Connect(function()
local RGB = string.split(BackgroundColor3TextBox.Text, ",")
if #RGB == 3 then
local R = math.min(tonumber(RGB[1]), 255)
local G = math.min(tonumber(RGB[2]), 255)
local B = math.min(tonumber(RGB[3]), 255)
local Color = Color3.fromRGB(R, G, B)
BackgroundColor3TextBox.Text = "["..R..", "..G..", "..B.."]"
BackgroundColor3TextBox.Parent.Color3Display.BackgroundColor3 = Color
else
local Color = BackgroundColor3TextBox.Parent.Color3Display.BackgroundColor3
local R = math.round(Color.R * 255)
local G = math.round(Color.G * 255)
local B = math.round(Color.B * 255)
BackgroundColor3TextBox.Text = "["..R..", "..G..", "..B.."]"
end
end)
BackgroundColor3TextBox.FocusLost:Connect(function()
local RGB = string.split(BackgroundColor3TextBox.Text, ",")
if #RGB == 3 then
local R = math.min(tonumber(RGB[1]), 255)
local G = math.min(tonumber(RGB[2]), 255)
local B = math.min(tonumber(RGB[3]), 255)
local Color = Color3.fromRGB(R, G, B)
BackgroundColor3TextBox.TextColor3 = Color3.fromRGB(R,G,B)
BackgroundColor3TextBox.Parent.Color3Display.BackgroundColor3 = Color
else
local Color = BackgroundColor3TextBox.Parent.Color3Display.BackgroundColor3
local R = math.round(Color.R * 255)
local G = math.round(Color.G * 255)
local B = math.round(Color.B * 255)
BackgroundColor3TextBox.TextColor3 = Color3.fromRGB(R,G,B)
end
end)