#Is there something wrong with how I'm calling to clients
1 messages · Page 1 of 1 (latest)
Remove the IsServer check
Assuming each client is going to call that function to tell the Server their name
Well I thought I could have it so that just the server calls it and then sends it to every other client. Is the only way to have all the clients call it?
Because I want in the future to be able to have the server send commands to every other client
ServerRpc is for clients to request the server to run a function. ClientRpc is for the server to request all clients to run a function.
So it seems like you’re kind of mixing approaches up. If you just want the server to handle things, you don’t need a ServerRpc. Just check for IsServer and call your ClientRpc.
How do I call my ClientRpc correctly
You just call it on the server.
So this should work
Yeah. Nothing wrong with the syntax. I’m not sure where you want it called from or what your desired outcome is, so I can’t really help with the logic.
You’re also using the legacy Rpc attributes. I would suggest using the new ones as they provide more flexibility and are clearer in who they’re sent to.
Gracias, yeah I'm getting back into the multiplayer aspect of this after like over a year 
Look into using sessions for player names
https://docs.unity.com/ugs/en-us/manual/mps-sdk/manual/player-name-integration-session