At the moment, I am attempting to make a cross-place party system that utilizes the new TeleportService:TeleportPartyAsync() function. I mostly have the in-server party creation system mapped out, but I haven’t a clue how to make that save when the party travels to another server. How would I go about transferring parties via JoinData?
I’d say use DataStores.
What do you mean by transferring parties via JoinData? Do you mean transfer the the list of players in the party? If so, that’s a return value of the JoinData table. I’m probably misunderstanding your question.
@Starception Data stores probably won’t solve it because I’d get throttled badly.
@Polymorphic Essentially what I mean is,
- Players begin at Place 1
- Players form a party at Place 1; Player1 is the Leader while Players 2-4 are in the Party
- Player1 enters a teleport location, rest of party is prompted that the leader is waiting to teleport
- When all players are in the area, all members are teleported via TeleportPartyAsync
- Players arrive at Place2
I’m aware that I can access JoinData and the contents of it, but how do I compare JoinData? I don’t assume that JoinData includes the Player’s own UserId. I don’t want any duplicate parties to form which is why if players have identical join data, a party isn’t formed.
Why would you need to compare JoinData?
This all comes down to how your party system is set up in game. Prior to registering a new party your in-game system, I would check to see if any of the players that were in the JoinData members table are currently in a party. If so, join the same party. If not, create a new one. This will make every subsequent player only join the party rather than create a new one.
The problem that I see immediately is the inability to discern who was the leader of the party in the previous server. The idea I mentioned previously functions in a first-come-first-served type of fashion, rather than preserving the initial hierarchy. JoinData won’t help you with that unfortunately, and you’ll likely need to use hacky methods such as DataStore or HttpService to preserve leadership, there isn’t much way around it unfortunately.
Does that answer your question?