That's funny, inverting a selection of layers was also the first thing I've tried to create a script for with chat gpt, getting the same result don't know why can't just add this basic functionality...?