To enable customers to pay only with cash on delivery when they choose Local Pickup, you can follow these steps.
1) Identify the name of your location/s in the Shopify admin settings:
2) Create a rule and select the criteria "Shipping Method", then insert the name of the the location for which you want hide payment methods and click on "Add shipping":
3) Finally enable all the payment methods you want hide and for this example leave only Cash on Delivery disabled.
In this way, when the customer will select "Local Pickup", he will be able to select only Cash on Delivery as a payment method.