# Attatch Component to Skeletal Mesh Socket?

**URL:** <https://forums.unrealengine.com/t/attatch-component-to-skeletal-mesh-socket/455387>\
**Category:** C++\
**Tags:** attach-to-socket, unreal-engine, skeletalmesh, CPP, question\
**Created:** [September 15, 2019, 4:38pm UTC](https://forums.unrealengine.com/t/attatch-component-to-skeletal-mesh-socket/455387 "2019-09-15T16:38:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_2bd0f2d71](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2bd0f2d71](https://forums.unrealengine.com/u/anonymous_user_2bd0f2d71)\
**Post date:** [September 15, 2019, 4:38pm UTC](https://forums.unrealengine.com/t/attatch-component-to-skeletal-mesh-socket/455387/1 "2019-09-15T16:38:32Z")

</div>

Hello,  
I’m trying to attach a gun to a socket placed on the skeletal mesh.

Here in preview mode, its in the right location:

![287432-screenshot-13.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/5/b/d5b1117a4896acd1ee897898a37c3b8af4b8362e.png)

In game, it is spawning at the root of the player and not moving:

![287433-screenshot-14.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/5/b/35b19df0eee05361aab30f5b3c35c1f8614c9b34.png)

```
FName fngrippoint = TEXT("GripPoint");
    	GunComp->AttachToComponent(GetMesh(), FAttachmentTransformRules::SnapToTargetNotIncludingScale, fngrippoint);

```

Here is the code to attach it, if anyone could help that would be great!

Thanks!

---

<div class="post-metadata">

**Author:** ![MFurmanczyk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MFurmanczyk](https://forums.unrealengine.com/u/MFurmanczyk)\
**Post date:** [October 23, 2021, 8:56pm UTC](https://forums.unrealengine.com/t/attatch-component-to-skeletal-mesh-socket/455387/2 "2021-10-23T20:56:41Z")

</div>

Have the same problem. Have you managed to solve it?
