Pairing/Team Up System

Similar to the one in Altitorture or Carry Me, how would I go about creating a pairing system in which one player can request to be partners with another player, and then if the other player accepts, then they are paired together. Otherwise, after a time period, the request is timed out? I am not too familiar with a concept such as this, and some help would be great.

3 Likes

First off you obviously want a way to send the request. However you want it to be sent doesn’t matter, what matters is that you would need a remote event which tells the server “hey this player sent this other player a request”. Once that happens, the server should invoke a remote event again telling the other client “hey, you got a request”. Afterwards, the server will wait for a response from the other client (you could use a remote function for this, but theres no need, a timer will suffice).

Once the other client responds by sending another remote event back to the server, the server checks if the timer has passed already. If not, the server pairs up the 2 players however you want to, no matter by connecting them with a rope or simply putting them in a team.

1 Like

Thanks a lot. I’ll take this into consideration.

Quick question, how would I “store” the info on the server for which player wants to pair with who?

Not sure since im not experienced but i have a vague idea, maybe try to put string values on the character
And when the server needs it it can search for it or smth

Thanks for the idea, I’ll look into it.

late reply but depends on how the “teaming” works.

For example, if its a game like altitorture where the players are physically connected, you might only have to check if the player has the attachment to a rope, and you dont have to actually store anything.

On the other hand, if its a more team like system, you could store it either as a string value in the player, or as a value in a table. You could also use roblox’s inbuilt teams stuff.