I would start with basic questions :
Are you sure the code is called ? ( log / breakpoint ? )
Are you sure “Anim” variable has a correct value ? ( set up and match the skeleton )
once all that is sure, after calling the code, while in PIE select the weapon mesh in world and check animation and animation mode there ( it should be correct, else post what you see )