Good Evening,
I’m going through a networking tutorial and trying to wrap my head around ClientRPCs.
I have a method in an encounter management class that checks if a player triggers a trap by walking through a collider. When the player triggers the trap I run a command on the server that checks to see if the player actually stepped on a trap, gets the player object and calls a client RPC defined in the player class to take damage.
The ClientRPC decrements the player’s health and writes a console message.
My question is this: When I build and execute, it correctly damages the player that walks over the trap, but all clients receive the debug.log statement in the console. Can someone explain why only one client’s health gets updated (I get this is the expected behavior), but all clients get the debug.log statement in the console?
Thank you in advance for the help. I’m sure I’m making this tougher than it is, but I’d like to understand before I move forward with more complicated topics.