Having trouble using "Get Socket Location"

On my Rifle skeleton I have a socket called “MuzzleFlashSocket”. I’m trying to get the location from my character blueprint (which has the Rifle added in as a child actor component). However it seems to just return the location of the rifle.

EDIT: I’ve realized the problem is that the muzzleflash socket is not being found in the rifle actor blueprint.

The rifle blueprint contains the rifle mesh which contains the muzzleflash socket. So, not sure why it’s not found.

never mind, I figured it out, I had to access the child actor, then cast to rifle, and only then I could use get socket location, pretty messy way of doing it but it works