How do I Assign client authority to a gameobject?

How do I if some variable returns true, give client authority or is it at all possible? I know that it is possible to spawn a object with client authority (https://docs.unity3d.com/ScriptReference/Networking.NetworkServer.SpawnWithClientAuthority.html), but that doesn’t help here. The object i want to assign authority to is a object that you can shoot and i want to destroy the object afterwards, but this isn’t possible if the client is the one to shoot the object. I think the answer may lay in (https://docs.unity3d.com/ScriptReference/Networking.NetworkIdentity.AssignClientAuthority.html)
but im not sure how to use it.

Add network identity to player then check the Local Player Authority in network identity then in script check condition if(isLocalPlayer) { … // here goes your shooting code} . also do not forget to add using UnityEngine.Networking ; and Instead of MonoBehaviour use NetworkBehaviour then you will get player on server and "isLocalPlayer " will check that player is Local or not and if it is Local it will shoot the object