I assume you know how pcalls work but it never hurts to go through it again:
When the pcall works but it's body has errored
local a, b, c = pcall(function()
return 1 - "three", 20
end)
print(a, b, c)
So in case of an error in the body we can observe that:
The first variable - a - becomes false, meaning success of the pcall was false
The second variable - b - becomes a string with the error that occured in the pcalls body
All other variables which would normally get a returned value were nil, no values have been returned
When the pcalls body runs safely
local a, b, c = pcall(function()
return 1 *3, 1 + 3
end)
print(a, b, c)
This time we can see that:
The first variable shows the body ran successfully
b- which was previously the error string - is now the first returned value and c is the second
Your problem
Your problem is that
return datastore:SetAsync(...)
Is as good as doing
return nil
Why? It's since the datastore:SetAsync() method returns no value at all. Hence the variable E which is the value returned by the body, is nil.