# Can't get location of snapped actor

**URL:** <https://forums.unrealengine.com/t/cant-get-location-of-snapped-actor/431521>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [August 12, 2018, 11:55pm UTC](https://forums.unrealengine.com/t/cant-get-location-of-snapped-actor/431521 "2018-08-12T23:55:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![EthanE1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EthanE1](https://forums.unrealengine.com/u/EthanE1)\
**Post date:** [August 12, 2018, 11:55pm UTC](https://forums.unrealengine.com/t/cant-get-location-of-snapped-actor/431521/1 "2018-08-12T23:55:43Z")

</div>

So basically I snapped my weapon to my pawns hand. Now I want to get the location of the weapons muzzle to spawn my effects and add my linetrace. Because its snapped now I get this Error:

LogSkinnedMeshComp: Warning: GetSocketByName(): No SkeletalMesh for Component() Actor()

Im using the Standard SK\_Rifle. It has the a Muzzle socket Im trying to get the location of it by doing this:  
(Tick)  
FVector LocationSock = MeshComp1-\>GetSocketLocation(“MuzzleFlashSocket”);

It gives me the location one frame and it sets its self to zero the next.  
Does anybody know a solution for this? I snapped it to my pawn by using the “AttachToComponent”.

Thank you

 ![250329-error.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/a/e/3aef9ce7711f54839922e40fa5dbdeab23331219.png)
