When using the script, the names of all characters should be unique. You can prevent the crash (but it does not correct the functionality) by replacing line 494: atkammo = findObjs({type: 'attribute', characterid: character.id, name: "repeating_attack_" + atkid + "_ammo"}, {caseInsensitive: true})[0]; atkammo.set({current: atkammo.get("current") + "|" + ammoid}); with atkammo = findObjs({type: 'attribute', characterid: character.id, name: "repeating_attack_" + atkid + "_ammo"}, {caseInsensitive: true})[0]; if(atkammo) { atkammo.set({current: atkammo.get("current") + "|" + ammoid}); } But as the script is looking up and changing characters based on the name, the best thing is make sure all names of characters are unique.