Nice script.
Might this
'CREATE NONCLUSTERED INDEX IX__' + parentschemas.name + '_' + parentobjects.name + '__' + REPLACE(foreign_key_columns.foreign_key_columns, ', ', '_') + ' ON ' + parentschemas.name + '.' + parentobjects.name + ' (' + foreign_key_columns.foreign_key_columns + ')' AS FKIndexCreate
be this
'CREATE NONCLUSTERED INDEX IX__' + parentschemas.name + '_' + parentobjects.name + '__' + REPLACE(foreign_key_columns.foreign_key_columns, ',', '') + ' ON ' + parentschemas.name + '.' + parentobjects.name + ' (' + REPLACE( foreign_key_columns.foreign_key_columns, ',', '' ) + ')' AS FKIndexCreate
Great Job, As Usual,
Doug