- Home /
how can i change my scripts to make them multiplayer aware,How can I change my scripts to make them multiplayer aware?
for my first person game I am using unity services to make it multiplayer but as soon as someone else joins the same room, the client can not move, only look and shoot, also, no matter which player moves (including looking and shooting), the other players will follow. I think I need to make my scripts multiplayer aware but I have no idea how. Does anyone know how this is done?,I am using unity services for multiplayer on my first person game but when another player joins the game, they cannot move, only look and shoot also, players follows any movements made by a different player and I'm not entirely sure if its a camera problem as well. Can anyone help?
Answer by Smurfj3 · Dec 15, 2019 at 05:24 PM
This question is way too broad to answer. You can't just make your game multiplayer with a press on a button or 1 line of code. It will have to change your whole structure. The reason your camera and stuff isn't working properly is because it spawns multiple cameras in the scene, so you have to disable all the cameras except your own camera, you can achieve this by simply checking if your player is the local player, same goes for the player controller.