Email Script - Cases Issue

SOLVED

Hi All

I'm just attempting to use the default Support email script that comes with a fresh installation of CRM (2020 R1). I've got it so that an inbound email creates a new case and the email is filed. But if an inbound email contains an existing Case reference number it just creates a new Case. I can't solve why it's not attaching to the already existing Case.