The return summary states
The attribute which has been assigned to the given name. If no attribute has been assigned then nil is returned
The second sentence is incorrect, if no attribute has been assigned then nothing is returned.
This also means that the
Variant return type is incorrect.
Variant implies that some value is returned, but when the attribute doesn’t exist it returns 0 values. WorldRoot:Raycast originally had a
Tuple return type because of this (it returned nothing when nothing was hit, was later changed to return
nil in such cases).