Example

Mr. A registered as Transporter under GST. He transports goods under reverse charge mechanism as GTA. On 15 April, 2018 he purchased a truck for Rs 12 lakhs and paid GST on it @ 18%. Whether Mr A can take credit of GST paid on truck?

Answer

Section 17(5) of CGST Act blocks credit on motor vehicles and other conveyances except when they are used:
    (i) for making the following taxable supplies, namely:'
        (A) further supply of such vehicles or conveyances ; or
        (B) transportation of passengers; or
        (C) imparting training on driving, flying, navigating such vehicles or conveyances;

(ii) for transportation of goods 
    
In your case the truck is purchased for transportation of goods, hence you are eligible for credit of GST paid on truck. 
    
However as per Notification No. 11/2017-Central Tax (Rate) vide s.no. 9(iii) for GTA, two rates are notified i.e.

5% without ITC and

12% with ITC 

Further vide Notification No. 13/2017-Central Tax ( Rate) GTA is not eligible for reverse charge mechanism if it is opting to pay GST @ 12%. 

Therefore in order to claim credit on truck purchased you have to opt out of reverse charge mechanism and you are required to pay tax @ 12% and take credit.