So, the event that is created on an attribute change is different if the change is triggered by a player/sheetWorker or an API script. If the change is from an API script, there is no newValue or previousValue passed. I've checked this behavior using a small test sheet and script: HTML <input type='number' name='attr_trigger' value='0'>
<span>newValue: </span>
<span name='attr_newValue'></span>
<span>previousValue: </span>
<span name='attr_previousValue'></span> Javascript <script type='text/worker'>
on('change:trigger',(event)=>{
console.log(JSON.stringify(event));
setAttrs({
newvalue:`${event.newValue}`,
previousValue:`${event.previousValue}`
},{silent:true});
});
</script> I used Jakob's chatsetAttr script as the API script to modify the attribute. Here's what the sheet looks like after a player initiated change: Here's what it looks like after a script triggered change: