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

How to retrieve script outputs?

I am making a script where players can execute certain other scripts and retrieve the output from each.

--executable script example:
print("Hi")

I want to make it so that when the player runs a script, a new GUI pops up and displays the output (like "Hi"). I already have the GUI set up, I just need to know how to retrieve the data from the output in order to put it into the Text of a TextLabel. Is there a function of some sort that allows you to access the string value of a certain output line?

Thanks!

1 comment

0

I know kohl's admin has this, but I have no idea how to do it.

2 answers

✓ Accepted answer

I have not used this before, but I think the LogService MessageOut event will let you read output from any script.


What may be simpler, if, for example, you can completely control the script that you are watching for output, would be to redefine the print function, with a simplistic example being

function print(...)
	workspace.Message.Text = table.join(unpack(...), " \t ");
end

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