Calling Client RPC in order to assign a Team value to clients. How to check the Role properly?

You are missing the UnrealNetwork include in the cpp file

#include "Net/UnrealNetwork.h"