Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How would I print indexes of LogService:GetLogHistory()?

The API on the wiki didn't help me at all, it only showed me the syntax, but I have no clue how to use it. I'm working on an AdminGui, and one of the features is that you can script from it. But if it errors, the user doesn't know what is erroring.

I know GUIs don't pick up prints, but I if I know how to print it, then I'll have some knowledge on how to use it, and from there I can expand on my own.

So, how would I use this? (And yes, I have tried to print it already.)

2 comments

0

Have you tried pressing F9 in game? That will show you game script errors

0

I wanted to make an Output GUI for all players (Which I have, I just got done with it.), so they can see Server errors, and not local errors, or whatever they're called.

1 answer

Got it fixed and added successfully. Here's my script:

function add(name)
	local o = Instance.new("TextLabel", script.Parent.EffectFrame.Frame)
	o.BackgroundTransparency = 1
	o.BorderSizePixel = 0
	script.Parent.k.Value = script.Parent.k.Value + 25
	o.Position = UDim2.new(0, 0, 0, script.Parent.k.Value)
	o.Size = UDim2.new(1,0,0,25)
	o.FontSize = "Size14"
	o.Name = name
	o.TextColor3 = Color3.new(255,255,255)
	o.TextWrapped = true
	return o
end
game:GetService("LogService").MessageOut:connect(function(Message, Type)
    local msg = add(tostring(Type))
	msg.Text = Message
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.