For example, when I try to find an Instance that isn't parented in to a specific Parent using :WaitForChild()
, it warns "Infinite yield possible on 'line of code here'". How can I get the line of code like in the example? Is it really possible? Thanks!
Hello!
I might be late, but you can use LogService for that.
So, here's an example I made real quick:
local LogService = game:GetService("LogService") LogService.MessageOut:Connect(function(msg) local number = string.gsub(msg, "%D", "") if not tonumber(number) then return end print("Error on line: "..number) end)
As you can see, LogService
returns a string that I will save as msg. Now, I use tonumber()
to check if the string we just modified is a number and then print the output. Well, this might not be what you want, but that's the best example I could make.
Also it might print as well stuff that was outputed by print()
. I didn't done much research, but for you to know, it is possible.