The following script is not working &lt;input type="hidden" name="attr_initiative" value="0"/&gt; &lt;input type="hidden" name="attr_passe" value="1"/&gt; &lt;input type="hidden" name="attr_locked" value="0"/&gt; function functiontest(msg) { &nbsp; &nbsp; var attribute = 'passe'; &nbsp; &nbsp; var characterID = '-Mq5SUNnAl4yvphcKgtu'; &nbsp; &nbsp; var character = getObj("character", characterID); &nbsp; &nbsp; var result = getAttrByName(character.id, attribute); &nbsp; &nbsp; sendChat('System',result); } It looks like hidden inputs are not created properly and cannot be accessed by the getAttrByName() method. Please find the discussion about this in the API forum: <a href="https://app.roll20.net/forum/post/10540011/instancing-of-hidden-attributes" rel="nofollow">https://app.roll20.net/forum/post/10540011/instancing-of-hidden-attributes</a>