I do it like this in C++
it is the only way it works
//------------------------------------
UPROPERTY(ReplicatedUsing=OnUpdateTeamType)
ETeam TheTeamType = ETeam::None;
//------------------------------------
UFUNCTION(Server,Unreliable)
void SetTeamType(ETeam TeamType);
//------------------------------------
UFUNCTION()
void OnUpdateTeamType();
//------------------------------------
void UMaterialHandlerComponent::SetTeamType_Implementation(ETeam TeamType)
{
TheTeamType = TeamType;
SetTeamSkin(TheTeamType);
}
//------------------------------------
void UMaterialHandlerComponent::OnUpdateTeamType()
{
SetTeamSkin(TheTeamType);
}
//------------------------------------