So what I’m trying to make is this party system, where u can invite players and then you can start the game. How would I start something like this?
A lot of effort can go into a good party system, but the basics would be something like this:
(I’m assuming you have basic remote event knowledge)
- When a player invites someone, you send a remote event to the server which in it’s turn notifies the invited player.
- If the player accepts, the server needs to store which players are in the party for any future reference. You can simply save a table containing all the players in each party.
- Here, you will also need to send all relevant information to all players already in the party to make any additions/changes to their UI (In this case, adding the new player to their party UI).
- Later, whenever you want to do anything where the party is relevant, you simply check this table and handle all the players accordingly.
Example: Party owner joins a match. Before the server sends them to the match, it checks which players are in the party and sends all of them.
You may also need the game to remember which players are partied up as they travel between servers. This could be done using SetTeleportData before you send them to another server.
Hope this helps!
Yes, this helped, but what im not good with is tables
There are many different ways to explain tables, but instead of that I’d recommend you watch these two. In the video he does the tables a bit different than how it’s standardly done in LuaU, but you should still understand the concept and how to use them.
Tables and how to utilize them
How to use Loops (Very useful when paired with tables)
Ok thanks the both of you, i will watch/read through them now