I wrote the code, and an error occurred at the point where the error message was output, saying there was a nil value, but when I looked, the pcall() function didn’t output anything. It just output nil, not true or false. What’s strange is that when I remove the external function, it returns a value. This is a module script. Example code:
local Success, ErrorMessage = nil
local function Function()
Success, ErrorMessage = pcall(function()
-- Code here
end)
if not Success then
print(ErrorMessage) -- Error: Attempt to concatenate string with nil
end
end