And to find the bug I basically need to continously have this running, and the output can become a mess. So I was wondering if there was something I could put at the top of all this that’d clear any previous prints, so the output only shows the current prints being performed
Well in the output window you can right click and click “Clear Output” or press “CTRL + K” and use comments to comment out unnecessary print statements and try to narrow down the bug to a print statement.
As for your actual question, I don’t think you can clear the output using a script.
Any users can correct me if you can actually clear the output via script.
Unfortunately the closest you can get at the moment is clearing the output manually with Control + K. However, you could create a bunch of blank lines to simulate starting with a fresh new slate.
For instance, this will create 15 blank lines:
I wouldn’t say you could exactly “clear” the output, but you can pseudo the effect, like what @posatta did. Otherwise, if you wanna clear studio output just do CTRL + K.
local function Clear(Lines)
print(string.rep("\n", Lines))
end
print("stuff")
wait(1)
Clear(20)
Kinda sad so this method only clears the output line in the studio. It would be nice if it worked in a regular game for the developer console. I would also like to see something like the removal of certain lines of information output, as the author of this topic wanted.