# On Avatar Change

```lua
function yourEvent(user, avatar)
    log(user.displayName .. ' has changed their avatar to ' .. avatar .. '!');
end

return function()
    addEvent('changeAvatar', 'yourEvent'); --attaches the event to yourEvent()
    keepAlive();
end
```

{% hint style="info" %}
Events are asynchronous coroutines.
{% endhint %}
