The animation is played across all clients becouse i got an OnRep function tied to RepAnimMontageInfo, whatever it changes and gets replicated all the clients call play anim montage with the info from the struct as seen here
UPROPERTY(ReplicatedUsing = OnRep_AnimMontage)
FRepAnimMontageInfo RepAnimMontageInfo;
void AMeleeKitCharacter::OnRep_AnimMontage()
{
PlayAnimMontage(RepAnimMontageInfo.MontageToPlay, 1.0f, RepAnimMontageInfo.StartSectionName);
print("playing anim montage replicated");
}
void AMeleeKitCharacter::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
{
Super::GetLifetimeReplicatedProps(OutLifetimeProps);
DOREPLIFETIME(AMeleeKitCharacter, RepAnimMontageInfo);
}
Feel free to correct me if im wrong but isnt the server only calling the PlayAnimMontage function ( which just plays the montage locally) not PlayMontage which is the one im using to handle the replication?, And again i appreciate the help!, im just trying to make sure that its all clear