How to make a click to target system like WOW

I was trying to make a click to target system, i.e., when you click an object, you'll lock the object as the target. I tried UI.GetCursorHitResult() and it worked all fine for all non-player objects.

However, it doesn't work with the player object(under multiplayer environment). It seems ignore the player and the cursor targets the ground.

Anyone has any good solution?

You could attach invisible client-side boxes to all players and check if those boxes are hit by the UI.GetCursorHitResult()

Yea, That is good idea. Thanks!