Component always spawning at 0,0,0

//Audio buzz constructor
ConstructorHelpers::FObjectFinderBuzzObject(TEXT(“SoundCue’/Game/Sounds/Ambience/Cooling_Cue.Cooling_Cue’”));
MachineBuzzCue = BuzzObject.Object;
MachineBuzz = CreateDefaultSubobject(TEXT(“CoolingNoise”));
MachineBuzz->SetSound(MachineBuzzCue);
MachineBuzz->Play();
MachineBuzz->AttachTo(GetRootComponent());

As a side note, it works fine in the editor when made as a blueprint, but in the packaged game it always spawns the audio component at 0,0,0

If that code is in your constructor and you are using a newer version, you want to replace

MachineBuzz->AttachTo(GetRootComponent());

with

MachineBuzz->SetupAttachment(RootComponent);

It’s really weird you didn’t get any error on 4.17.

Did my solution worked out for you?

Sorry for the really late reply. It appears it works in editor, but in a packaged game, it seems to move the audio component to 0,0,0 in world space still.