Currency devaluation doesn’t really help encourage FDI if that’s what u mean by foreign investment; assets tend to lose relative value that way when you’re investing in a foreign currency. More of a shot across the bow to the US govt that whatever further tariffs they slap on top of the additional $300bil worth of Chinese exports will be counteracted through a cheaper RMB, also that a weaker RMB can be used a financial weapon in and of itself to destabilise markets just as the US has done with tariff policy.