.h
UPROPERTY(Replicated)
bool bInteract;
.cpp
void AActor::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
{
Super::GetLifetimeReplicatedProps(OutLifetimeProps);
DOREPLIFETIME(AActor, bInteract);
}