How Can I Check For Warnings?

Hi So I want to make a system that can tell me when ever something in the logservice is sent and it’s a warning. I think it would be something like this:

local log = game:GetService("LogService")
log.MessageOut:Connect(function(message, messageType)
	if message.messageType == warn() then -- this is just an example I know this is not how
--- what ever
   end
end)

How would I do this??

You’d check that the MessageType is the MessageWarning enum.

Yes I am aware but I’m not sure how.

This should be working!

local LogService = game:GetService("LogService")


LogService.MessageOut:Connect(function(message,messageType)
	if messageType == Enum.MessageType.MessageWarning then
		-- Message is a warning!
	end
end)
2 Likes