Spawn projectile class in SkeletalMeshSocket

Hey,

i’m trying to spawn my projectile class in a SkeletalMeshSocket, so that i can expose this Socket to BP to easily change from right handed to left handed.

But i can’t get it to work properly: this is my code right now, which works and spawns the projectile in the character

void APPRProjectile::BeginPlay()
{
Super::BeginPlay();

if (Role == ROLE_Authority)
{
	if (Instigator)
	{
		SetActorTransform(Instigator->GetActorTransform(), false);
	}

	SpawnOrigin = GetActorLocation();
	SpawnRotation = GetActorRotation().GetNormalized();
	SetLifeSpan(LifeSpan);
}

const FVector Direction = SpawnRotation.Vector();
const float Speed = GetLaunchSpeed();

Launch(Direction, Speed);

i tried to use GetMesh()->GetSocketLocation (“RightHand”), but this didnt work

Can someone enlighten me how to do this please