# getAvatar

{% hint style="warning" %}
An avatar is not the same as a User.

the Avatar class contains data relevant towards a specific avatar, such as available gear items and color palettes that can be equipped.
{% endhint %}

```lua
return function()
    local targetAvatar = getAvatar('block_man');
    if targetAvatar == nil then
        log('target avatar could not be found!')
    else
        log (targetAvatar.name);
        for (i,gear in pairs(targetAvatar.Gear()))
            log(gear); --prints the gear sets that are available to the avatar
        end
    end
end
```

{% content-ref url="../classes/avatar" %}
[avatar](https://docs.streamavatars.com/lua-scripting-api/api-reference-and-tips/classes/avatar)
{% endcontent-ref %}
