- Home /
Starting Arsenal in multiplayer
Hello,
My game is a bit special, because the players "physically" wearing his weapon during the game. It means when Player spawns, his weapon must be spawning together with the player. It works fine with 1 player, but when a client joining (with same weapon) he gets 2 weapon prefab on his body.
The actual method is: in the "Start()" function there is a Cmd_Starting_Arsenal command. In the "Cmd_Starting_Arsenal()" function there are the Instantiate & NetworkServer.Spawn lines.
When I tried to find the problem I made a version where a Key activating the "Cmd_Starting_Arsenal()" function: I noticed if ServerPlayer starting "Cmd_Starting_Arsenal ()" function before the Client joins, The Client also gets the weapon when he joins. In the last 3 days I tried everything but without success, any help would be great!
Thanks,
Answer by Andriska07 · Jul 15, 2018 at 06:02 AM
Solved. Forget to try the isLocalPlayer param
Your answer
Follow this Question
Related Questions
Multiplayer click and spawn 1 Answer
attached prefabs before client joins 2 Answers
Photon Instantiate 2 Answers
TCP responses are not receiving properly on client side. 1 Answer
server command works from host, but not from remote client 2 Answers