Few days ago, I’ve noticed that when calling instance:FindFirstChild(number) , a warning is generated with a full stack trace. This trace indicates the specific line of code that called the FindFirstChild function with incorrect parameter types.
I’m interested in achieving a similar result. I have tried using print(debug.traceback()) to print the traceback, but this results in standard print text.
What I’m looking for is a way to print the stack trace in blue text, similar to the warning generated by FindFirstChild.
Yeah, you can’t print it in blue (REFER TO POST 6). traceback() is your best bet.
Assuming :FindFirstChild() still does the outputting, this could work:
You could make a function that just contains the following:
function Traceback(Error)
warn("An error occured:", Error)
script:FindFirstChild(15905)
end
if 0.1 + 0.2 == 0.3 then
print("All is well")
else
Traceback("Computer maths is broken")
end
I felt like there was something that allowed you to do that, and kinda just assumed I was recalling something from a feature request when it didn’t show up in the debug library. I’ll look around in TestService later lol.