Console won't log

I’m trying to make a script that logs the developer console (server-sided console) and posts it on a UI.
Here’s what I got so far:

local LS = game:GetService("LogService")
local function OnMessageOut(message)
	local TL = Instance.new("TextLabel")
	TL.Parent = script.Parent
	TL.Text = message
	TL.BackgroundColor3 = Color3.new(15,15,15)
	TL.BackgroundTransparency = 0.7
end

LS.MessageOut:Connect(OnMessageOut)

Here’s an example:
RobloxStudioBeta_hmiHu55i5a
It doesn’t post anything on the scrollingframe.
I’m not looking for a spoonfeed, I’m just looking for a few explanations and ways to fix it.

Message Out is only from the outputs of the client console:

Oh, I’ll try using ServerMessageOut and see if it works. Thanks!

1 Like

I got an error(The current identity (2) cannot ServerMessageOut (lacking permission 5). I think I might need to use a ServerScript but it’s not possible to use ServerScripts on UIs.

Yea, its not really possible. Just stick to MessageOut for now.

I’d like it to log the server-sided console though.

There’s no way to do it, though. I mean, you could do a chat command that prints on the client and then it logs on the GUI.

1 Like

you could send a remote event to the server then, re-send via a remote events the logs

1 Like

That’s because ServerMessageOut is RobloxScriptSecurity (CoreScripts only). For the solution of your problem, why not use RemoteEvents to send messages from the server to the client?

1 Like

or just, not be dumb like me and sending a new log each there is a new one

1 Like

Well, mostly due to the fact that I don’t know how to do that.

Well there is some docs, RemoteEvent | Roblox Creator Documentation

1 Like

I would also like to add a full guide to remotes, if needed. Remote Events and Functions | Roblox Creator Documentation

1 Like

I can’t think of a way of using

local RE = Instance.new("RemoteEvent")
RE.Parent = RS
RE.Name = "newMessage"

to get messages sent to the server.

You can use this to send from the server to the client with FireClient on the server
For simplicity sake, I’m going to use FireAllClients but be sure to have some sort of UserId whitelist

--// Server
local LogService = game:GetService("LogService")

-- your remote
local RE = Instance.new("RemoteEvent")
RE.Parent = RS
RE.Name = "newMessage"

LogService.MessageOut:Connect(function(message, messageType)
  RE:FireAllClients(message, messageType)
end)

--// Client
local newMessage = RS:WaitForChild("newMessage")

newMessage.OnClientEvent:Connect(function(message, messageType)
  -- display the log messages on the gui
end)

Something like this but doesn’t have to be exactly so



It works but not exactly

I’m gonna go to sleep, I’ll check on this tomorrow.

Where is the RemoteEvent? LocalScript should be waiting for the RemoteEvent exactly where it’s been placed, assuming it’s already been created.

Bruh it’s literally because the text label is microscopic.

the RemoteEvent is in a storage folder in the gui.
image