The RPC is only send to the GameObject with the same NetworkViewID, not to all objects. Also both sides have to have the called function, the server and the client. They don’t have to be the same fucntion, but they must exist even when only called on one side since it’s potential possible to send it to everyone.
You can have two seperate sctipts for server and client and both contains the RPC functions but with different implementation (can be empty). The usual way is to have the same script on both sides and check with:
if (Network.isServer)
{
}
else if (Network.isClient)
{
}