Possible to show Output in game without F9

The question is simple can you show your output without F9.

Like on a GUI Text label or something?

You can type “/console” in the chat to show developer console while playing a game.

Uhhhhhhhh

Type /console in chat

Yes I know that I mean by like making something

So you can look at a GUI in game!

Like a self made GUI.

With your own frame to see a spasifice thing like just the log

Are you trying to make a GUI display whatever the console outputs? I think you can use LogService.MessageOut for that, an event that fires when something gets added to the output, a print, a warn, an error, anything

Then example provided in the article explains well how you can display the newly added thing in the output, and it gives enough to work with as it gives the message added and type of message it was, (Printing, warning, error mostly)

Just a reminder, do not put a stray print or warn in the event, it will cause recursion and make the event repeat itself many times which eventually errors

3 Likes

so I would use that on a textlabel?

You could if you wanted to, you can use the 1st return of the event as the text of the textlabel

Example

game:GetService("LogService").MessageOut:Connect(function(Message, Type)
    textLabel.Text = Message
end)

Where textLabel is the name of the variable that holds the textlabel you want to change the text of.

You can even use the 2nd return to do something if the type is a certain type, like changing t he color to orange if it’s a warning, red if it’s an error, etc

1 Like

Could I maybe make it so it shows a certain type, like just the Log? No errors or warningS?

And is there a way I could maybe get the top 10 or something, not just the lastest?

Hopefully you get what I am saying

Yes, just check if the 2nd return is equal to Enum.MessageType.MessageOutput, which I think it’s for prints, that or Enum.MessageType.MessageInfo

You can use GetLogHistory() for that, returns a table of the messages outputted in the output as of the function being called. I think that’s what you want at least

1 Like