Help with server scripting and capping size

Im making a fortnite kind of game where the player can invite there friends to there lobby if there playing my game in another lobby. it sends an invite to them on there lobby and if they accept the invite it puts them in the same lobby as the person who invited them.

things i have no idea what to do on:

    • sending invites from one server to another server
    • making it so the server slots is 3 but also making it so people cant just join by clicking join in the servers tab and have to be invited to join (max people in a party is 3)
    • sending the player back to an empty lobby without kicking them from the game (optional)

this system sort of reminds me of islands lol

1 Like

Put multiple players into each of these lobbys and create a viewing area of teams for each player on their own, from there you can either invite from within game or use messaging service to send data between servers

what about lag? your solution seems to be very very lag enducing

The problem is most likely whatever your trying to run or the way you are implimenting it. Ive used both things multiple times with no lag on a rubbish pc while running a bunch of other scripts.

  1. Use MessagingService to send the invite. You should set a cooldown so you don’t exceed the limits.

  2. There are some ways to do it, none of them is perfect though.

First way: You could make both of the players teleport after the invitation is accepted to a new server which would be a new lobby with more slots, designed for multiple players.

Second way: you could teleport new players from the public server to a new, private server with multiple slots right after they join the experience. Then you’d have multiple slots in each of these new servers but no randoms would be able to join, unless invited.

Third way: you can handle the teams entirely via MessagingService and MemoryStores so all the players are in a public 1-slot server but they can interact. The most complicated way but gives some benefits.

  1. Simply use TeleportService to create a new server of a default place.

I hope it helps, feel free to ask me if you don’t know how to go about scripting this! :slight_smile:

It’s not going to work when the server is full.
Also, requires a lot of effort to prevent exploiters from invading the ‘view areas’.

Not really they could only view it on the client and not have any effect on other players gameplay, as for player count thats where managing your servers comes in, also its possible to display character from a client in another server if a server is full.