Getting StaticMeshactor from world and attach it to socket


yesterday I tried to get a reference to a StaticMeshActor and attach it to a specified socket, all in c++ but it does not attach the staticmeshactor from the world.
I tried a few things in BP using a blueprint callable function to verify my logic is correct.

Here is a more detailed thread about this question

If anyone could point me in the correct direction, this would be great because this seems like a common task and I cannot figure it out :confused:

Thank you in advance