pcall returns a tuple of two values. The first value is whether or not the provided function ran without errors. The second value is changeable based on the situation. If the function errored, it is the error message. If the function did not error, it is the return value(s) of the function provided. pcall means "protected call," which makes sense, if you think about it. Here's are a few examples:
local a, b = pcall(function()
return 5
end)
print(a, b)
local a, b = pcall(function()
return 5 + "x"
end)
print(a, b)
local a, b = pcall(function()
end)
print(a, b)
In your case, SetAsync likely doesn't return anything. Since you're returning nothing, that nothing is being printed. I believe it should be printing nil, since that's what is outputted when I do this:
local a, b = pcall(function()
return (function() end)()
end)
print(a, b)
In case you didn't know, this outputs nothing (not nil, nothing):
print((function() end)())
If you are even more interested, you can look into what happens when you do something like this:
print(type((function() end)()))
For comparison, take a look at type with nil as the argument:
print(type(nil))
After further experimentation, I found that, if a variable is defined as nothing, it is nil (value changed at assigning?), which was surprising to me:
local x = (function() end)()
print(x)
That means that your E should be nil, even if SetAsync returns nothing (which it does, I just looked at the wiki). For your information, even in the case of the function returning nothing, pcall returns that value if the code within ran successfully:
print(select(2, pcall(function() end)))
So... not sure what's going on in your case (perhaps some weird behavior on Roblox's end). Cause E should be nil by the behavior demonstrated my my examples, even if pcall is returning the tuple true, .
####Hope this helps. Have a great day scripting!