How to manually destory GameObjects on player leaving game in Photon

To further explain there is a section in the PhotonNetwork script named autocleanup, by default this is set to true which means all objects owned by or instantiated by the player are destroyed when the player leaves the game, however i dont want all objects instantiated by the player to be destroyed so setting this to false prevents anything being destroyed, however now im having trouble trying to destroy the player character prefab upon a player leaving, i tried this

public void OnPhotonPlayerDisconnected(PhotonPlayer player)
{
if (player.ID == PhotonNetwork.player.ID)
{
Destroy (this.gameObject);
}
}

however it didnt work, i think because the object automatically changes owner when a player leaves, does anyone know a different method i can use to destroy the player?

Do you got a solution, I’m stuck on the same Problem :frowning:

I think the better way to do that is to establish control variables likes a boolean to make sure the order of application of the methods.