Disconnect all players from room
Hello,
I am currently struggling with an issue for a while.
Let's suppose I want to disconnect EVERY player in a current room, how do I do?
I tried several strategies, such as kicking players with a foreach loop, or using an RPC, but it's like none of those work.
Thank you in advance.
I am currently struggling with an issue for a while.
Let's suppose I want to disconnect EVERY player in a current room, how do I do?
I tried several strategies, such as kicking players with a foreach loop, or using an RPC, but it's like none of those work.
Thank you in advance.
0
Comments
-
Hi @Devilclown1607,
Thank you for choosing Photon!- Set room's IsOpen to false and IsVisible to false.
- Call CloseConnection for all players from Master Client.
- Master client leaves the room
0 -
Hey, I forgot to reply, but it worked for me! I had to combine your solution with a RPC call!
Thanks again0