So basically, I have this AdminGui that I've made, and you can script from it, but the player doesn't have a ServerLog they can use (This is a very privileged admin, for more advanced users. But it does have some fun commands.), so I scripted out another separate GUI that acts as an in-game output. In my script, I set the name of a textlabel to the Enum.MessageType, so I can change its TextColor3. They all work, except for Enum.MessageType.MessageWarning. I have no idea why this should be erroring.
Here's my script: (But before that, it should be noted that no other GUI interacts with this one, except for my AdminGui which only toggles visibility.)
function add(name) local o = Instance.new("TextLabel", script.Parent.EffectFrame.Frame) o.BackgroundTransparency = 1 o.BorderSizePixel = 0 script.Parent.k.Value = script.Parent.k.Value + 10 o.Position = UDim2.new(0, 0, 0, script.Parent.k.Value) o.Size = UDim2.new(1,0,0,10) o.FontSize = "Size14" o.Name = name o.TextColor3 = Color3.new(255,255,255) o.TextWrapped = true o.TextScaled = true if o.Name == "Enum.MessageType.MessageInfo" then o.TextColor3 = Color3.new(0, 0, 255) elseif o.Name == "Enum.MessageType.MessageWarning" then o.TextColor3 = Color3.new(246, 185, 63) elseif o.Name == "Enum.MessageType.MessageError" then o.TextColor3 = Color3.new(255,0,0) end return o end game:GetService("LogService").MessageOut:connect(function(Message, Type) local msg = add(tostring(Type)) msg.Text = Message end)
K is a number value, which acts as a position.
I helped in chat
The problem was turning brickcolor to color3 this is possible by doing
newcolor3 = BrickColor.new("Bright yellow").Color