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.

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    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
  • Devilclown1607
    edited April 2021
    Hey, I forgot to reply, but it worked for me! :D I had to combine your solution with a RPC call!

    Thanks again