How can other players destroy room objects?


I am having a problem getting other players that are not the master to destroy enemies. These enemies are instantiated as room objects by the master client. The master client can destroy these enemies when they shoot them with a projectile or when the enemy collides with the master client. When the other players shoot the enemy or the enemy collides with them, the enemy is not destroyed. The player is damaged however. I have tried using photonView.IsMine as well as PhotonNetwork.IsMasterClient. Any ideas?

Here is the code snippet of the collision detection where the enemy should be deleted. This script is attached to the enemy. Debug logs are called, but enemy is not destroyed when other players collide with or shoot the enemy.

Update: The collision is happening on the client side so the client can not destroy the room objects. A simple RPC call to only the Master Client, that will destroy this game object, fixed the problem! Idk if there is a better wat, but a RPC call worked, for anyone else with this problem.