How to make enemy players invisible using Photon?

Im working on a multiplayer top down shooter using Photon Cloud. I’m trying to make it so that all enemy players are invisible (meshRenderer = false) unless they are in your vision cone (which I have implemented and is working using raycasts). I’m new to photon and networked multiplayer in general so if anyone could offer some advice on how to go about this it would be awesome. I guess more specificlly my question is about how to make certain meshrenderers enabled from certain players views and disabled for others. Hope that makes sense and thanks a lot

I guess you mean how to solve the following issue:

Client A says: Hide player C because he’s out of range (playerC.meshRenderer = false)
Client B says: Hey, but player C is in MY range, so make him appear (playerC.meshRenderer = true)

The solution would be simply not to sync your visibility state over the network. Just send his actions, not his point of view.

In case you want to implement an alert function (Player X is aiming at Player Y), let PlayerX send a message over the network to PlayerY that he’s been discovered. Like detectedPlayer.applyAlertAction(this.playerID) or similar.