LineTraceSingleByChannel didn't check AI Character for outhit

Hello, I’m developing a FPS game that shoots with a hitscan technique based on LineTrace. If the first factor hit through LineTrace is AI, I want to halve the HP of AI, but the factor is never detected. Instead, elements in the level design are detected. Can you tell me what the problem is?

if (GetWorld()->LineTraceSingleByChannel(OutHit, Start, End, ECC_Visibility, CollisionParams))
	{
		if (OutHit.bBlockingHit)
		{
			UE_LOG(LogTemp, Warning, TEXT("OutHit: %s"), *(OutHit.GetActor()->GetName()));
			if (OutHit.GetActor()->GetName() == "AI") {
				AprojectCharacter* AI = Cast<AprojectCharacter>(OutHit.GetActor());
				AI->CalculateHP(-10);
				UE_LOG(LogTemp, Warning, TEXT("AI HP: %d"), AI->HP);
			}
		}
	}
}