I was wondering if it is possible to detect which type of error pcall has got/outputted?
Sorta like this:
local success, err = pcall(function()
local fakecharacter = workspace.ThisPartDoesNotExist.Character -- intentional error
end)
if err then
if err == "attempt to index nil with 'Character'" then return end
warn(err)
end
If it isn’t possible is there a similar approach to it then?