How to not have multiple meshes when updating bone rotation

I have overridden the Tick function for a custom character and adjusted it such that a bone’s rotation in PoseMesh would spin based on the time parameter; however, when I update a bone such as the ankle, it produces a visual glitch making it seem as if their is two feet on one leg. One foot being the moving one and the other being the original position. I’m not sure what would cause this error, but I would prefer to only see the bone move, not 2 feet

Could you include the code for your tick function?

void AJacob::Tick(float DeltaTime)
FRotator KneeRotation(10.0 + tiltPerTick, 35.0 + tiltPerTick, 65.0 + tiltPerTick);
USkeletalMeshComponent* characterMesh = GetMesh();
if (!characterMesh) {
GEngine->AddOnScreenDebugMessage(-1, 10.0f, FColor::White, TEXT(“NULL”));
FName BoneName = characterMesh->GetBoneName(197);
PoseMesh->SetBoneRotationByName(BoneName, KneeRotation, EBoneSpaces::ComponentSpace);