Attaching static mesh to socket

Hi, I’m trying to attach a simple box static mesh to a character socket using the AttachActortoComponent in level blueprint. I know that the pivot of the static mesh should attach to the desired socket but the problem is that even when I change the pivot location, the mesh still attaches at the center. I change the pivot location of the static mesh by changing its pivot offset in the details panel. Sorry if it is a stupid question but I can’t solve it, Please help.

Update: let’s say that I create a box brush then make it a static mesh. If I change the pivot offset of the brush before converting it into a static mesh, the attach happens to the new pivot but if I change the offset of the static mesh itself nothing happens. So what to do if I have an imported static mesh?