Camera problem with 2 or more players

Hi,
I have a big problem with my cameras : when there are 2 or more players in my game on multiplayers, they are using the same camera and no one can play.

Can you help me ?

(Sorry but I don’t speak english)

How could they be using the same camera? Do you mean the camera on both clients is focusing on just one player?

You need to have code that correctly finds the correct player gameobject and associates the camera with it. What I have done is have a camera in the scene, and when the player is spawned I have it check if isLocalPlayer is true, and if it is true then I have it find the camera by tag and set the player gameobject to the target parameter on my camera script for what object it should follow.

There’s of course other ways to handle it, but when it comes down to it you’re going to want to check for isLocalPlayer on the gameobject you want your camera associated to.

Thank you !
I mean each players are in first person, but with my problem all players have the same camera on the latest player gameobject spawned.

If you keep having problems, post the code you’re using to associate the camera with the player and someone will be able to suggest what to fix.