> For the complete documentation index, see [llms.txt](https://docs.streamavatars.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.streamavatars.com/lua-scripting-api/api-reference-and-tips/global-functions/setproperty.md).

# setProperty

```lua
return function()
    setProperty(data, 'test', 20);
    log(data.test); --prints 20
    
    data.test = 30;
    log(data.test); --prints 30
    
    setProperty(data, 'test', 20); --this will not set the property, since it already exists!
    log(data.test); --prints 30
end
```

{% hint style="info" %}
Notice the last log prints 30 because the previous setProperty was ignored (because a value already exists there)
{% endhint %}
