
Aloha! Been working on a custom sheet and actually learning a lot by building it from the ground up, but I'm still figuring out sheetworkers and one particular problem just doesn't seem to be solvable by my smoothbrain efforts. The goal is to have a button on the sheet: when pressed, a roll is made and depending on the outcome, an attribute is raised or lowered by 1 point - with a range of 0 - 4. The button appears fine: it's clickable but nothing happens when it's pressed. My other sheetworker scripts all function correctly The button reads as such: <button style="background-image: url(<a href="https://github.com/LewisDTC/AnimeTemplateProject/raw/main/san-00.png" rel="nofollow">https://github.com/LewisDTC/AnimeTemplateProject/raw/main/san-00.png</a>); position: absolute; left: 175px; top: 70px; background-size: 80px 80px; background-repeat: no-repeat; width: 70px; height: 70px; border: none; outline: none; background-color: transparent;" type="action" name="stability_roll"></button> My update script is split into three sections: I know that it's not efficient, but since I couldn't get the thing working I broke it down to try and troubleshoot it: on('clicked:stability_roll', function() { getAttrs(['stability, willpower_mod'], function(values) { let roll = RandomInteger[{1, 20}]; let stability = parseInt(values.stability)||0; let willpower = parseInt(values.Willpower_Mod)||0; let result = parseInt(roll+stability+willpower)||0; if (result >= 10) { newstability = stability + 1 } else { newstability = stability - 1 } setAttrs({stability: newstability}); }); }); // Restrain Stability to Minimum on("change:stability", function() { getAttrs(["stability"], function(values) { let stability = parseInt(values.stability)||0; if (stability < 0) { setAttrs({ stability: 0 }); } else { } }); }); // Restrain stability to Maximum on("change:stability", function() { getAttrs(["stability"], function(values) { let stability = parseInt(values.stability)||0; if (stability >= 5) { setAttrs({ stability: 4 }); } else { } }); }); The variables used are: attr_stability attr_Willpower_Mod So uh... anyone have any idea what's wrong here?