How can i use raycast in multiplayer? My problem is if shoot the enemy the raycast don’t send the message: Lose Health. And how to make multiplayer bullet holes? If you shot the wall the other player can’t see the hole. (Sorry for my bad english.)
You cant send a ‘multiplayer raycast’. In my weapon class I use an RPC call to tell all other clients to invoke a ‘fire raycast’. Another solution is to call the raycast on the server and then use RPCs to play to animation and send damage to the clients.