Here;s a method for you to try. First change the value in your action buttons to only include the {{title= }} and {{roll=}} parts -those parts that when it is a repeating section, are attributes that are only from that repeating section. Example: <button type='action' name='act_roll' data-i18n="fine-art-u" class='repeating_skill_roller_emp' value='{{title=FINE ARTS: @{fa_name2}}} {{roll=[[1d10!+@{emp}[STAT]+@{fine_arts2}[SKILL]+?{ADDITIONAL MODS? (Bright Light, No Vision, Terrain etc)|0}[MOD]]]}}'> FINE ARTS: </button> Then in your sheet worker, do this: const buttons = [ 'roll' , 'repeating_finearts:roll' , 'repeating_npcskill:roll' ]; buttons . forEach (( b ) => { on ( `clicked: ${ b } ` ,( event ) => { const trigger = event . triggername . splice ( 8 ); // this always starts with 'clicked:' // prefix gets an empty string for normal attributes, and repeating_section_ID_ for repeating attributes const prefix = trigger . startsWith ( 'repeating_' ) ? trigger . split ( '_' ). slice ( 0 , 3 ). join ( '_' ) + '_' : '' let rollBegins = '@{whisper}&{template:statistics2} {{name=@{character_name}}}' ; // rollPart should be constructed to include NO global attributes, only repeating sections let rollPart = event . htmlAttributes . value . replaceAll ( '@{' , `@{ ${ prefix } ` ); let rollEnds = '{{fumble=[[1d10!]]}} {{fumble2=[[1d10!]]}}' ; startRoll ( rollBegins + rollPart + rollEnds , ( results ) => { var rollComputed = results . results . roll . result ; var roll2Computed = 0 ; if ( results . results . roll . dice [ 0 ] == 1 ) // We check if the first die is a fumble. { rollComputed = results . results . roll . result - 1 - results . results . fumble . result ; } if ( results . results . roll2 != null ) { roll2Computed = results . results . roll2 . result ; if ( results . results . roll2 . dice [ 0 ] == 1 ) // We check if the first die is a fumble. { roll2Computed = results . results . roll2 . result - 1 - results . results . fumble2 . result ; } } finishRoll ( results . rollId , { roll : rollComputed , roll2 : roll2Computed } ); }); }); }); This uses a standard roll beginning and roll ending, and extracts the bit that changes in each roll from the button value. It also identifies whether this is a repeating section or not, and if so inserts an appropriate prefix inside all the @{} references, in the button value. I haven't tested this, but it should help you make progress. For your buttons outside of the repeating section, you might need to give them unique names for it to work properly, I don't know, but that's always a good idea because it allows people to use the buttons in chat menus and call them from scripts. If they don't have unique names, players can't do these things and the sheet is missing out of the full functionality of roll20. If they do have unique names, you'll have to add each name to the buttons array at the start.