For some reason the SetActorLocation method will not work on my Pawn

I did these in the code and rebuilt my Blueprint
header:

UPROPERTY(EditAnywhere, BluePrintReadWrite)
		UStaticMeshComponent* mesh;

	UPROPERTY()
		USceneComponent* root;

source

mesh = CreateDefaultSubobject<UStaticMeshComponent>("mesh");
	root = CreateDefaultSubobject<USceneComponent>(TEXT("root"));
	RootComponent = root;
	mesh->AttachTo(root);