i made this for personal use but maybe it could help y’all too
it basically just shows LOCAL output messages in chat, without needing to have the output window open too
i bascially just made it to learn setcore & logservice
code
local Enabled = true
--// code
local logService = game:GetService("LogService")
local variables = {
["error"] = {
color = Color3.fromRGB(255, 57, 57);
prefix = "[ERROR]";
},
["warning"] = {
color = Color3.fromRGB(252, 255, 52);
prefix = "[WARNING]";
},
["output"] = {
color = Color3.fromRGB(255, 255, 255),
prefix = "[PRINT]"
}
}
logService.MessageOut:Connect(function(Message, MsgType)
if not Enabled then return false end
local color
local prefix
local client = true
if MsgType == Enum.MessageType.MessageError then
color = variables.error.color
prefix = variables.error.prefix
elseif MsgType == Enum.MessageType.MessageWarning then
color = variables.warning.color
prefix = variables.warning.prefix
elseif MsgType == Enum.MessageType.MessageOutput then
color = variables.output.color
prefix = variables.output.prefix
else
color = Color3.fromRGB(119, 29, 255)
prefix = "[ROBLOX]"
end
game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage", {
Text = prefix.." [CLIENT] "..Message;
Color = color;
Font = Enum.Font.SourceSansBold;
TextSize = 18
})
end)