AttachToComponent ← thats causing the crash… you using that in constructor… do you know what is constructor right?
ClassName::ClassName()
{
//// more code
// Possibly attachtocomponent here somewhere
}
you should use SetupAttachment() instead of AttachToComponent