Limit The Amount of Players That Can Join An Online Lobby

How do I make a lobby in which if there are 4 players no more can join?
How do i check if there are 4 players in a lobby and then stop anybody from joining?

Just have a variable that counts the players in the lobby. If the player joining >= then lobby max, don’t execute the events to join.

Real basic example (Should have the Join checks the opposite way I guess since there is no else actions.)

can you give me an example

There is no such thing as a lobby in GDevelop, you’ll have to elaborate on what you have done so far to make a lobby as there are countless ways do do that, and limiting a lobby depends on how you made that lobby.