I want to run this project in a server window and a client window, so I selected New Editor Window(PIE) and set the Number of Players 2(Picture 2).
Then I set both of the car pawns as Picture 3 shows,
I open the level blueprint and set it as Picture 4 shows.
After all, when I click the Play Button, I found that the server can control one of the car pawns called Sedan and the client can control a new car pawn which appears in the place of NetworkPlayerStart, just as Picture 5 shows.
the way you handled it clearly shows that you need to learn about Networking first. You kinda violated all the “rules”
Example:
#1: PlayerController(0) and PlayerController(1) is not for Networking (LAN/Internet), but for Splitscreen. Means PlayerController(1) is not even a thing in your Setup. #2: Same goes for “AutoPossess” set to Player0 #3: BeginPlay of the LevelBlueprint calls on all Players. So you are calling possess on all instances while also always using a non existing PlayerController(1). This is simply not how it works
Possessing needs to happen on the Server. Either you set the DefaultPawn to the Sedan and let the GameMode handle that by its own
OR
You set it to NULL and use the “OnPostLogin” function of the GameMode. It passes you the PlayerController of the new Player (including ListenServer).
At that point you can SPAWN a new Sedan and use the passed PlayerController to call POSSESS on it.