"SphereVisual" in Components and Collision Tutorial

I am trying to learn code in unreal engine, so im trying to use the Components and Collision tutorial. I’m stuck on the 1st “work-in-progress-code” where you set up everything. For some reason my “SphereVisual” pointer is giving me error after the line i set it up:

SphereVisual->SetupAttachment(RootComponent);
if (SphereVisualAsset.Succeeded())
	{
		SphereVisual->SetStaticMesh(SphereVisualAsset.Object);
		SphereVisual->SetRelativeLocation(FVector(0.0f, 0.0f, -40.0f));
		SphereVisual->SetWorldScale3D(FVector(0.8f));
	}
OurParticleSystem->SetupAttachment(SphereVisual);

I’m confused because this is only happening with “SphereVisual”. When i set up the “SpringArm” pointer i have no issues or with anything else in the 1st “work-in-progress code” section for that matter. I have the header files that were given the tutorial as well. I did this project on the 4.24 verison of the engine.

the code i posted only shows where i used “SphereVisual” because that is where im getting errors the my actuall code is 1 for1 with the 1st work-in-progress section