This was asked here. I tried that users method and it didn’t work for me.
For some reason, everything is working but CmdSetTarget isn’t executing. I’ve used Debug.Log in the foreach loop in TryTarget function and it’s definitely running and target is definitely not null. Everything is set up in the inspector correctly.
EDIT: I think I figured it out. Whenever I built the game I’d use that to host the server and connect the Unity Editor as the client. I switched this around and it was working correctly. If I’m understanding this correctly the script is being run on the server even though it’s called on the client. So whenever I connected the Unity Editor as the client it’s not seeing the changes being made.