#My output clears itself because of this script.

1 messages · Page 1 of 1 (latest)

night estuary
#

Hi, i got this script from chatgpt to try something but for some reason this script clears the output and i cant see the errors i deleted the script and output was normal so something wrong with this script i also asked Chatgpt about this but it couldnt solve the issue this is really a problem for me becasue i cant see the errors, prints. Can someone help me?

pliant pelican
#

I can try to help, I dont see any reason why this code would be clearing the output because to clear the output I think you would have to use LogService:ClearOutput()
Also is it constantly clearing the output during game or only once when the game starts?

#

@night estuary

night estuary
pliant pelican
#

oh, and then you can print to the output again fine?

night estuary
#

after 5-10 secs yea

pliant pelican
#

what if you add a task.wait(3) at the top of the script

#

or something to see if it does the same but just delayed

#

to make sure its happening within the script

night estuary
#

letme test that

night estuary
#

this is really weird

#

i added the wait but when i do task.wait(3) instead of 3secs its delayed for 10secs

pliant pelican
#

oh. Is it consistently doing that?

night estuary
#

but when i delete the wait, output is insta cleared when the game first starts

#

i think some part of the script is filling the output and output is just looking empty

#

not cleared

pliant pelican
#

Oh like its sending blank lines maybe or spaces? That sounds odd

night estuary
#

im just guessing

pliant pelican
#

For me the output clears normally when I press play but only once

#

And you said disabling the script fixes it?

night estuary
#

yes!

#

the problem is the script

pliant pelican
#

I feel like it must be another script/plugin doing it because I can't tell within the script why.

#

Maybe try commenting out the line that uses 'warn' because thats the only thing i see interacting with the output

#

But I feel like maybe another script is the cause

night estuary
#

im gonna add wait(1) print("a") every line of the script to see the which line is the issue

pliant pelican
#

Or instead you could try disabling plugins

night estuary
# pliant pelican That works

i found the problem i checked 2 times the output clears after the a44 print if primaryPart then
wait(1)
print("a43")
local offset = position - primaryPart.Position
wait(1)
print("a44")
for _, part in ipairs(newBase:GetDescendants()) do
wait(1)
print("a45")
if part:IsA("BasePart") then
wait(1)
print("a46")
part.Position = part.Position + offset
wait(1)
print("a47")
end
end
wait(1)
print("a48")
end

pliant pelican
#

hmm what if you add another task.wait(3) right after print("a44") again to make sure its because of that script and not something in the background

night estuary
#

ill try the make another script for my game cuz this script is weird

pliant pelican
#

It could be something else that is being caused indirectly because of your script

#

How many scripts are in your game?

night estuary
#

but its fine when i disable the script

pliant pelican
#

Yeah it could be like a chain reaction type thing caused by the script but not directly, or a roblox studio bug cause idk

night estuary
#

ill try to fix it when i wake up

#

ty for your help!