In my code, when I use ‘null’ as value for argument ‘post_parent’, it shows all attachments (as thumbnails), so that works. But what I actually want is only showing attachments from certain posts. The value ‘$post->ID’ should provide me with the attachments of its parent, but it doesn’t work (no attachments show).

It’s still the same as explained above. All attachments are shown when using ‘null’ as value for argument ‘post_parent’, but when using ‘$post->ID’ or argument ‘include’ with as value a number of a specified post, it doesn’t work and shows nothing.