I’m working at the moment on a multiplayer first-person game. My problem is the live control of the players.
For shooting I use a raycast and at the impac point I spawn a spark. That works fine. But how can I programm a livecontrol-script. I have no ideas how to do somthing like that in the network. I know that I can have on the enemy a script and that I can access to it with GetComponent to reduce the health. But it seems that this doesn’t work in the multiplayer.
Nope, you will only affect your own scene and not the scene of the other players. You need to send an RPC command to the other players and inform them anout the hit and resulting actions.
Is require because my livecontrol script is not on the same Object as the fire script. (It’s on a parent)
The problem is now that the player doesn’t lose health.