Hello , I am making a SB(Script Builder), I made a output GUI And to output things i make new objects on the output GUI with a UIListLayout But the problem is that the colors dont change correctly I made this Note : the desk is PlayerGui wich can be used by my script and the "args" are the arguments , because i use a function (and it is a string)
local TextLabel = Instance.new("TextLabel") TextLabel.Parent = desk.outPut.Frame.list TextLabel.BackgroundColor3 = Color3.new(1, 1, 1) TextLabel.BackgroundTransparency = 1 TextLabel.BorderSizePixel = 0 TextLabel.Position = UDim2.new(0, 0, -0.00471380493, 0) TextLabel.Size = UDim2.new(999, 999, 0, 18) TextLabel.Text = args TextLabel.TextColor3 = Color3.new(29, 0, 255) TextLabel.TextXAlignment = Enum.TextXAlignment.Left
I get no errors but the color does not change , It stays with the same color of a normal textlabel, I did it with orange color , but it changes to yellow, Why does it happen , How i can fix it?
Color3.new
takes numbers between 0 and 1, so you'd have to divide each number by 255 to get your colour. If you don't want to do that, use Color3.fromRGB
instead.local TextLabel = Instance.new("TextLabel") TextLabel.BackgroundColor3 = Color3.new(1, 1, 1) -- this is a white colour. if you want that ok TextLabel.BackgroundTransparency = 1 TextLabel.BorderSizePixel = 0 TextLabel.Position = UDim2.new(0, 0, -0.00471380493, 0) TextLabel.Size = UDim2.new(1, 0, 1, 0) -- if you want to fill the screen, do this TextLabel.Text = args TextLabel.TextColor3 = Color3.fromRGB(29, 0, 255) -- here TextLabel.TextXAlignment = Enum.TextXAlignment.Left TextLabel.Parent = desk.outPut.Frame.list
Parent
last, as you should always do this to up the performance of your game.