- Home /
i get an error when the host shots the client in Unet
Hello, when i build my 3D game in Unity and i also hit play in the editor, i create a server in the editor and i join with my build. So that works fine but when i shoot the player2(the build player / "the client" i get an error witch look like this (KeyNotFoundException: The given key was not present in the dictionary.) and his health does not go down. And if i shoot the player1(the Editor game window player / the one who hosted the game) with my build player"Player2" it all works fine!
Sorry for my bad English, please tell me questions if you dont understand what i mean, and ill try to explain better! This error is blocking me so if you know the problem please help me!
and i can also share the code if you need to!
//Alvin
You should copy the whole error message (it says the script and the line with the problem) and all the code related to shooting.
Also, try running the server in the build and the client in the editor so you can get more info when an error occurs.