How would you go about doing this? (If it's possible)

How would you get all of the messages from the output and put them in a textbox, (probably with a UIList and with different colours). Or would you have to make your own console and have to only be able to print those?

This is about a bunch of stuff regarding things about this question

1 Like

There’s a way of reading the Output, but I forgot how, there’s a topic about taht
After your would store all the messages in a table, and ‘paste’ them in your custom Output

I see. I was bored so i thought it would be a cool idea to make a plugin like ‘Output 2.0’ or something. it would give you more detail and you could make your own console and all that stuff

Taht would still be very useful! I’ve just seen a topic where they ask to have custom Color’s in the Output, so I think it would be very gladly used!

ill try that maybe it’ll work…

LogService

You should be using LogService to recieve the messages from the Output.

Keep in mind that a lot of these functions are used for Core Scripts so some may not be usable.

But with the of MessageOut, we can get the Messages from the output, with MessageOut we have 2 Arguments, Message, and MessageType, this Message can vary, it could be an Error, or it could be a warning, so with this table, you can store the MessageType as the index, and sotre a piece of data you want it to hold, in this example, I made it hold some functions that go accordingly with the MessageType:

local Stats = {
	[Enum.MessageType.MessageError]   = error, -- for errors
	[Enum.MessageType.MessageWarning] = warn, -- for warnings
	[Enum.MessageType.MessageOutput]  = print -- standard output messages
}

Info here

Which as you can see, It could help use to indicate what to use when MessageOut will fire, so when it does we can simply index the MessageType and fire the function inside, like so

game.LogService.MessageOut:Connect(function(msg, msgType) 
    Stats[msgType](msg) -- fires message under message type
end)

But for your Purpose, you can simply hold a Color3 value for a specific message instead of a function, and you can apply the Message of the Object you want to color:

game.LogService.MessageOut:Connect(function(msg, msgType) 
    TextLabel.TextColor3 = Stats[msgType] -- changes text color accordingly
    TextLabel.Text  = msg -- Applies text
end)

1 Like
game:GetService("LogService").MessageOut:Connect(function(msg)
   put.text.path.here.Text = msg
end)

Ok, but how would i incorporate this? How would you know if it’s an error, and How would you make a new textbox to put in the list?


game:GetService("LogService").Changed:Connect(function()
		
	-- i duno

game:GetService("LogService").MessageOut:Connect(function(msg)
			script.Parent.TextLabel.Text = msg
			
	end)
end)

that is my current code…

@DasKairo’s code should be what you are looking for

game:GetService("LogService").MessageOut:Connect(function(msg,type)
   if type == Enum.MessageType.Error then
        -- error occured thingy put ur things here!!
   end
end)

didn’t see that :skull: ill read it know

everyone ignores me, so sad :frowning:

Unable to assign property TextColor3. Color3 expected, got nil

got it working earlier, now it doesn’t work…

code:

local Stats = {
	[Enum.MessageType.MessageError]   = Color3.new(1, 0, 0.0156863), -- for errors
	[Enum.MessageType.MessageWarning] = Color3.new(1, 0.666667, 0), -- for warnings
	[Enum.MessageType.MessageOutput]  = Color3.new(0.172549, 0.172549, 0.172549) -- standard output messages
}



game.LogService.MessageOut:Connect(function(msg, msgType) 
	
	local old = script.Parent.TextLabel
	local new = old:Clone()
	
	new.TextColor3 = Stats[msgType] -- changes text color accordingly
	new.Parent.TextLabel.Text  = msg -- Applies text
end)

The colours are placeholders. I have made a new textbox but it doesn’t work.

Sorry :frowning: I didn’t see it somehow. I must be blind or something

wow. Nevermind. The code didn’t save and it deleted the parent bit…

Its probably because I forgot the Enum.MessageType.MessageInfo , so you may need to add that.

You should use game:GetService(“LogService”), it’s best practice

image
cool so far. It actually works. I’m gonna make it look nicer, and hopefully it’ll be usefull one day

2 Likes

okay. Already i have another problem…

It uses a scrolling frame, so every message the scrolling frame canvas needs to be tweened bigger…

image
tween doesn’t seem to be an option :skull: How would i end up fixing this?