Full transcript of “How to make a Party/Team System in Roblox! (Roblox Studio Scripting Tutorial 2023)”. Click a timestamp to open the video at that moment. Need another video? Use the YouTube transcript generator.
0:00 yo what's good with Y in today's video I got the how to make a party slash team system in Roblox um not going to lie guys this took me like a it took me like I've been working on it for a week I've been working on the party for a week but not like literally all day every day but just like putting in like half an hour to hour most days and then some days two to three hours stuff but it kind of is my fault for it taking so long because I kept distracted anyway so yeah the party system this is be part one um I know a lot of people wanted wanted it I was honestly I was surprised how many people wanted it but whenever I did the polls and everything yall was all like want the party system and stuff so here you go I finally finalized it um I have tested it multiple times and stuff and I've tried to think of like all of the like you know like just making making sure everything like errors can be handled
0:46 and everything and just trying to think of all the scenarios and stuff but I'm not going to say 100% guarantee that it is bug free it should be in stuff I did think of most of the stuff and I found a lot of issues so I fixed all that stuff prior to recording the video but if if there are any issues let me know in the comments I will um I will fix those issues and then I'll for I'll more than likely end up doing a part two because I know a lot of people wanted this video so the video does well I will do a part two I can add like a marker system like you guys know where like you can see your uh the people in your party like you can see like how far away they are like based on you know how far how far away they are and stuff like that I could do that but yeah so if you enjoyed the video leave a like And subscribe and let's get straight into the video okay so first things first of course the you a lot of the stuff is already pre-made only thing I'm going to be doing with Y is the scripting right so in replicated storage we're
1:32 going to need a remote event click the plus icon insert a remote event if you don't see it type remote event you want to name this remote event party event and make sure you put that inside of replicated storage then inside of server storage you're going to need to have a folder so plus icon type folder insert a folder and you're going to want to name it parties right this is how we're going to keep track of all of the um part well yeah parties that that have been created and that are currently existing we're going to parent them to this folder right name of parties leave it inside of server storage then inside of starter GUI here's where you're going to have your party GUI I'm going to walk you guys through how I made mine okay so the setting by default you want to make sure that the party GUI is not enabled and
2:19 you want to make sure that reset on spawn is not checked the only reason I'm enabling it right now is just so I can just show you guys what it looks like but you don't want to have it enabled and stuff we're going to enable it via Keyon but anyway so insert a screen GUI name it party GUI insert a frame into the GUI and name it party frame I will walk you guys through you know I'll show you guys all the properties and stuff so you guys can see size positioning so you guys can literally just make the UI exactly like how I made mine if that's what you want of course so walk you guys through each thing individually so we have we have frames a text box uh some text labels and and two text buttons so first things first we have the invite players frame just to clarify something this isn't a regular frame this is a scrolling frame right right remember to insert a scrolling frame you just type scrolling yeah then you just insert it
3:05 so here are the properties and stuff the invite players frame here is where all the players that are um you know in the server that are in the server that you that are able to be invited uh their names are going to appear here and they're going to be and then they're going to be text buttons right and then inside of uh both of the frames you want to have a UI grid layout here in my settings so simply just type UI grid layout you should see it and then just insert it here are the properties I went with right so pretty much when you join the server you're going to see other people's names aside from your name obviously because it would make sense to be able to invite yourself to a party so yeah you so when I test it you guys won't see any names because obviously you know my name won't be there I can't invite myself but yeah so the names will be here then you make sure you have a UI grid layout make sure you have it inside
3:51 of both of them inside of both the party members frame and invite players frame but yeah for this Frame name it invite players frame then here's the party members frame right this this is the second well second and last frame here are the properties if you guys want to see and just a reminder everything should be visible all of that yeah everything should be visible ex oh sorry I'm going get into what needs to not be visible but yeah so the party members frame so you know when you've created a party your name will obviously be here when you've created a party right so when you've created a party your name will be here along with your party members names pretty self-explanatory make sure you put the UI grid layout inside of it and then name it party m frame then we have the create party button which as you guys can probably tell this is how you create a party then here are the properties people are going
4:37 to be able to press this button and when they press it um it's going to fire their remote event to then try to to then uh create a party right um and then it's going to of course do some checks one it's going to make sure that the player is not currently in a party and if they are in a party it either it either does one of two things it either doesn't allow people to create parties if they're in a party or it will make them leave the party I think it'll make them leave the party I think that's what it is yeah yeah I think it'll make them leave the party and then they'll create and then it'll create their party but yeah but you but here's where you would insert your party name the create party text box here are the properties so you guys can see here's where you would type uh you know the name of the party all right and then here you here are all the properties this is a this is simply a text box so you just insert text box and then you would name it
5:22 create party text box you insert your party name here when you click the create party button if it's if it's successful and it works you're going to see party name um and then instead of Na it'll have the name your party right there right then we have the leave and dispan party button of course the reason that this is invisible is because it would make no sense for this to be visible uh if you if you are not a part of a party like the button will only be visible if you are a part of a party because it just it wouldn't make sense at all for um for you to try to for you to for you to need to leave or to span button if you're not you know a part of uh party and stuff and just to clarify something right here's what it looks like and stuff this is the only thing that you need to be uh to set not visible this is the only thing right everything else be handled via the scripts but this is the only thing right
6:09 but yeah um so leave SL dispan because if a regular member tries uh clicks the button they're just going to leave the party now if the party leader clicks the leave SL dispan it's going to dispan the party it's going to just it's going to kick everyone out and the party will be destroyed yeah then we have the invite players text label this is at the top the text labels are simply just so you know uh people know like okay this is what this Frame is for and yeah then here are the properties you guys can see then of course we have the party members text label once again it's just to let people know like here are all the current members of your party in the frame and then we have the party name text label which like I said um that's that's where uh the name of your party is going to be updated when you join a party or create a party and then yeah you want to S the text to party name you
6:55 well this is optional you don't have to necessarily do this but yeah yeah that's what I did right right there're all the properties and yeah uh that's all the UI honestly I feel like it's it's very basic very simple in my opinion and stuff so yeah so reminder once again the only things that need to be that like you need change visibility make sure that the create I mean the leave SL dis spand button is not visible and make sure that the party GUI is not enabled and that reset on spawn is make sure 100% make sure that this is not that this is not enabled cuz if it is then that means if a player were to Die the UI would reset back to default so they wouldn't be able to like they'd still be a part of the party on the server side and other players in the party would see their name in the party but they wouldn't be able to to see that they're in a party and it would just cause a whole bunch of issues but anyway
7:41 yeah so we have our party and everything that's all the prerequisite uh stuff you have to have set up now we get into the scripting not going to lie guys this video is going to be probably like 20 30 minutes long cuz maybe 30 minutes cuz it's it's a lot honestly but the good thing is we can do a lot of copy copy and pasting I just hope I we can do a lot of copy and pasting I'm just hoping hoping I just remember to change certain things I know some stuff I have to change uh little things if I do plan on copy and paste but anyway so let's get straight to it so inside a starter player and then starter player scripts insert a local script you guys are going to want to name this script party script and then parentheses put uh local right and let me just check okay need to check we're going to delete print hello world and then we're going to make just a couple variables first things first we're going to get the user
8:27 input service of course local uis is equal to game get service user input service then I'm going to get the tween service local TS this is how we uh we're going to have the invites for one of players invited to a party it's going to appear on side of the screen it's equal to game get service Queen service right then the local player of course so is equal to game. players. local player and then let's get the remote event local party event is you to game the replicated storage wait for child party event and we have all of our variables now we get into the functions we have about we have technically only two functions but we have you know different events for uh uh each function well at least the on client function I should say well
9:12 actually no for both but anyway let's get straight into it so let's say u. input begin connect function and parentheses put input comma processed enter we're going to say if input. user infot type is equal to nm. user INF type ty. keyboard and process is equal to false enter right then we're going to say if input. key code is equal to nm. key code. I went with the uh the letter P because you know P for party but it's up to you guys what whatever keepon you want enter then of course we're going to um we're going to enable or disable the UI we're going to say player. player gy. party gy. enabled is
9:58 equal to not then copy and paste this contrl C contrl + V it'll pretty much set the prop set the property to the opposite of what it currently is if it's disabled it'll then be enabled if it's enabled it will then be disabled and stuff instead of having to write like a whole if statement thing but yeah then we're going to skip a line and then we're going to say if player do party GUI I'm sorry if player. party if player. player GUI that party GUI enabled is equal to true enter then I'm going to say 4 I comma VM pairs this is pretty much the um this is to clear out the invite players uh thing and the reason for that is because I'm going to repopulate it because you know
10:44 um a person can open the menu and the players uh in like in the server at the time but then but then if they close it and then they open it again like say three five minutes three 3 4 minutes later or whatever the case um that player may have left so we want to make sure that it's updated whenever the player uh opens the menu so yeah so I'm going to say I'm going to say um for I imp pairs we're going to do player. player guy party GUI party frame you guys probably do a lot of copy and pasting of like this exact line invite players frame get children do was simply going to destroy everything except the UI grade label so if he is a it should be a text button CU
11:29 how we invite players so text button V destroy right then we go on outside of the function so skip to ends then skip a line and we're going to use another for Loop so 4 I comma V impairs we're going to repopulate it we're going to say game. players get children enter we're going to say if not playerplayer guy. party guy. party frame party members frame find first child v. name dot dot dot quotation mark oh sorry quotation mark space layer text label right and v.n name sorry n v.n name is nil equal to player name because
12:18 like I said we don't want we don't want to put our own name in there right then we're gonna say wait oh my God I just realized something I just realized I'm I call it I wow I just realized that actually I call it I called all them player text labels but I but they're actually buttons it's interesting okay I'll change this hopefully there are no issues we'll hope oh wait no there are going to be issues yeah there's going to be okay just yeah just don't let the names confuse don't let the names confuse you even though we're calling a player text label it's really uh in the party members frame it's buttons it's wait no no no no no party members you know what never mind just just ignore just ignore I've been working on this for too long yeah we're going to say
13:05 player text laay definitely will be copy and P copy and pasting this you to instance. new text button Comm player oh sorry make sure you do it on the outside Comm player. player gy. party guy. party frame invite players frame enter Then I'm G say player text label. text scale this is optional but yeah I I I wouldn't see why you wouldn't want the text to be scaled but yeah then I'm going to say player text label. text is equal to v.n name is going to be the player's username and then I'm going say player text label. text is equal to v. name dot dot dot quotation marks then we can say player say
13:53 player text label or actually [Music] I feel like we could change this like we could do player text button I'm just going to hope for the best honestly okay so just change that guy let's change that if there are any issues if there are any issues then we can if there are any issues then simply uh just come back and fix okay so if you run into any issues involving this in particular just change it back just change both of them back to the player text level that's all you got to but I I think it should be good I think it should be good but yeah so once we've done that we're then going to say player text lab I forgot I should have changed this as well player text button paste all over that then I'm going to of course say that accept the
14:39 function for a mouse button one click connect function close parenthesis enter then I'm going to say party event here's how we invite players so fire server in quotation marks put invite player and that's the name of the event then we're going to send over we're going to say player we're going to say player text button that text which remember that is the player's username so yeah I don't know why there's an I don't know why there's an error I think I forgot is it an extra end so confused what is the issue want to see what the issue is I don't get it g me some Ty error um hold
15:26 on one one there needs to be one so that's weird am I missing an end or no or do I just have too many no that's not fixing issue either H I wonder what the problem is let me just let me backtrack let me backtrack yeah let's just back trck guys okay let's see there's still an issue I'm so confused wind I feel like I just left something opened or something because this is
16:11 weird like what I didn't even notice it was an issue was player on name then what's the issue look could what is it expect to close at line six line six line six got end oh me see I think it's just too many ends yeah okay there we go is just too many ends okay I still this shoes Okay so anyway let's get back to what we have before so make sure you just do player text but that was the problem and had a second or second to last I guess
16:57 you could say but yeah so once we've done that then we're going to set up the uh the mouse button click function connect function close parenthesis enter then I'm going to say party event buer server then you guys guys remember invite player we're going to send over the players uh player's name so that text cuz that's the name then we're going to skip this end this end and this end space in between we're going to set up two functions we're going to set up one the create party um function and the leave SL disband function so simply let's say rest of some time uh let's just copy and paste this so let's do it like this let's contrl C this so control contrl C and then we're going to say create
17:45 party button Mouse button one click connect function close parentheses enter then let's do it again contrl + V then disband leave SL disand party Mouse but one click connect function close parentheses boom right then then we can pretty much copy and past this to control C control V I'm trying to save as much time as possible so contrl V all right and then of course we're going to change the event type so create party we do got to send a little more information over then we got to send over the name of the party that we're trying to create because one we got to double check that the person trying to create a party uh one that they're not currently a part of a party to making sure that the name isn't uh like we don't want duplicate
18:32 names we don't want people having the same name we don't want two parties having the same name pretty much player. player gy. party gy. party frame and then we're going to say create party textbox text that should be the name of the uh party then for this this is the leave slash disband party then for this we don't need to send we actually don't need to send anything over because all the party all the party information is on the server side so and it automatically sends over the players information so so there's no need for anything else there so yeah great news guys we are done with the we you're done with the uh one of the functions I would
19:18 say we're uh about oneir or yeah about one3 done with the script but anyway let's handle the on client stuff so let's say party of events down client events connect function in parentheses you're going to want to put event type comma AR one comma ar2 enter then I'm going to say if event type is equal to quotation marks party created is for one for one a party leader has created a party we're going to say local party name is equal to argument number one then then I'm going to set a whole bunch of properties I'm going to say player. player gy. party gy. party frame. party name text label. text we really only have to type all the type the like these four lines that I'm
20:03 going to do once and then we can just copy and paste and just change it is equal to St Marks party Name colon space that that do then throwing party not event party name right then we're going to say player. player gii party gy. party frame then set the lead the span party button we're going to make that visible now because the players now part the players now created a party so so they can just uh disband it if they so choose then player. player gy. party gy party frame then create party button. visible is of course uh set to false because they have already they already one created a party into a party party so yeah and then we're going to say
20:49 player. Play gy Party gy. Party frame. create party text box we also want to set this uh go to false it doesn't really change anything CU they can't because we already made the create party button not visible but I I just don't see a point in really having it visible if there's no I really need to right and then we can um let's see let's see um uh I want to say we could really yeah let's yeah let's copy and paste this I feel like we could just this will save us some time so let's control C we'll just change a couple things so put definitely put a space in between this right and then we're going to need to add a couple more things so now this is actually a text label so player text
21:36 table because this is the uh party members so player that so player text lab control c contrl c uh copy control V paste or and you can also use these up here but anyway yeah so make sure this is a text label then of course it's going to be parented to the party members frame so change that party members frame right um we want it so we do want the text so we do want the text to be scaled uh as for the text itself we want the text to be equal to the player's name because this is this event is only fired to the player who created the party so the information should really just match the player then player. name so player. name and then just change this to player text label right and then we do need to set a couple more wait I just realized oh wait
22:24 oh no no no sorry this should be the name not the text that should be the name there we go then we do got to set we do got to set just a couple things just the background color and the text color but this is optional though this is just what I really wanted to do so that background color equals color 3. new as for the color I want with I want 0.24 0.24 and 0.24 it's like a dark gray right and lastly we're going set the text color so text color 3 is equal to color 3. new now as for this uh guess say 0.69 0.69 0 69 oh there you go and yeah so there we go with that um and yeah just like that we finished the first event onto the next
23:10 event so else so else if event type is equal to this is party disband this is when a party leader uh disbands a party and stuff then we are going to first uh we're going to make a variable so local player name right isal to R1 and then we're going to say here's what I meant when I said we copy and paste this so contrl c contr v right so when a party is disbanded right um that means it's going to destroy all the party member uh you know all the text labels in the party frame because the part is you know essentially being destroyed so we're going to say party name is equal to n/ a you know right there right um yeah so we we could say like
23:57 like that then for here oh yeah I'm delete those dots then we're going to literally just do the opposite we're just going to do the opposite so that's false then set these two equal to True right this is what I meant by said like like I feel like we can like we'll save a lot of we'll save a couple seconds and honestly minutes in total by just copy facting then we're going to destroy everything in the party M frame but let's save ourselves some more time let's go up here and then let's get this for Loop contrl C contrl + V and I believe oh yeah no we just have to change uh what we're St so instead of the invite player players frame it is the party members frame and then uh the difference is instead of a text button it should be a text label right let me just make sure I did that right up here too text button
24:44 yeah okay okay so yeah then from there we have finished a party dis spand event honestly we're kind of blown to these events not going to lie then on to the third event so else if event type is equal to party leave the difference between party leave and dispan is the part is being destroyed right the part is no more party leave is just a member is leaving not the leader itself so not the leader them themselves just the leader I mean just the member so for party leave honestly it's very simple we're going to get the player's name so local player name isal to R1 right then we're going to say then we're going to simply just use a 4i loop we're going to say 4 i v impair then we're going to say player. party or
25:32 sorry not player name player do player gy party gy. party frame then we're going to say party members frame and then for this we're going to of course get children so get children enter and then we're going to say let's see we're going to say if V is of one a text label right I don't really matters we're just checking names but just regardless you know and we need to make sure that the names match so v. text remember text is the name of the player is equal to player name make sure you do player name not player. name player name right then we're going to say V that destroy so the person knows okay they left like I said I can add a whole bunch of things like a text table
26:18 appears where it's like such and such has left the party I'll include stuff like that in part two part three whatever the case may be if you guys if that's what you guys want but yeah then moving on to the next event we are I believe we're almost I believe we're almost done but just C there like I think it's like two more on the client side then else if event type is equal to this is invite player now this is when I player has been um uh what's it called invited right the person the player who's receiving the event uh this is when they've been invited so first things first the name of the party so they know who's inviting them is equal to R1 then I'm create an invite text button I'm going to say local invite text button is equal to instance.
27:06 new t button comma I'mma copy and paste this just for the sake of time so I'm a contrl c control v um you really just want to par this to the frame in all honestly not really a place to put it by the way invites will only work if a person has the party menu open which I mean that kind of makes sense to me cuz like if you're trying to invite your friend then you could just simply tell them make sure that the party menu is open but yeah so then I'm going to set the initial position of it I'm going to say position is equal to udm 2. new I'm say 2 comma 0 comma 0 comma 0 right then on to the next property I'm going to the text and it's going to Beal to you have been invited to the space dot dot dot party
27:52 name dot dot dot party period right and I just set that off already right then end it off with a period then I'm going to set the size so invite text button. size is equal to udm 2 new and then for this by the way this is optional size like the size and stuff like that it's up to you guys we do 0 comma 200 comma 0 50 enter then I'm going to set then I'm going to set the name we're going to set this equal to player name dot do dot text actually I don't want to do
28:39 text label because it's like my I mean not players can see see but I but just developers I guess the people who are doing that let's say invite invite text not the button actually but yeah then we got three more damn I did not really this many properties but anyway we have the background colors so background color three. new same thing as before 0.24 0.24 and 0.24 then in I text button we want the text to be scaled so true invite text button dot text color 3 isal to color 3. new then I'm going say oh sorry then I'm
29:25 going say 0.69 same thing9 0.69 right then I'm play I'm going to set the tween local tween is equal to TS create invite text button comma Queen info. new uh you guys are welcome to put the D for how as long as you want as it takes to for them for the invite to be visible I'm going to go with 1 second not like for it to be visible but like for it to like move across the screen so one second then nm. eing style ler nm. Direction and then I went with I went with in right then go to the outside common in between property table so special bracket and I'm going to say position is equal to udm 2. new I'm going say 1.1 comma 0 0 0 then of course
30:15 uh lastly I'm going to play the twen I'm say tween I see there's an issue what is the issue oh period right there but yeah so once we played the TN then we're going to set up the function for if a player presses it so invite text point. Mouse button will click next function close parentheses enter right then I'm going to fire their mod event so party event fire server then I'm going to say invite accepted right and then I'm going to send over the player's name so player the name now everything think about it is not really a point since the name would already be there but it is what it is then I'm going to also of course send over the name of the party so we know who to like add the players uh name to then I'm use a foury loop to clear out the party
31:00 members frame which I think I already did this before yeah so I'm just control C this control V we need to clear out uh the differences this time we're just we're doing a entire like CLE thing out because this means the player is joining a new party so we just want to make sure that nothing else is there then lastly um after two ends when it say invite text button destroy because they've accepted the invite so no need for it to be uh visible any further then after that I'm going to say I'm going to put wait test that wait 5 Seconds uh the reason for this is because the invite will be visible for 5 seconds giving the player 5 Seconds to decide if okay I want to join the party or not so yeah if you guys want it to be long or shorter adj just the number as needed but yeah
31:45 then we're going to use an if St we're going to say if invite text button which pretty much means if it still exist then we're going to destroy it after the the uh duration right we have to use an if statement because it might already be destroyed if the player accept the set invite now on to I believe the last of so enter I'm going say else if event type is equal and this is new member this is when a new person has drawing like honestly the party system wasn't that bad until I got to the like having to invite players and stuff that's one things really got took a minute but anyway first things first player name is equal to ARG one then local party name is to arg2 to right then I'm going to use an instatement if
32:30 not playerplayer gy. party gy. party frame. party members frame find first child oh sorry find first child and then make sure you do player name dot dot dot quotation marks text label right text label enter then we're going to really we can just uh I believe we can just set some properties if I'm not mistaken wait oh okay okay okay I get it now I
33:16 get it now anyway um well actually now that I really think about it couldn't I just do all of this like it doesn't matter it doesn't matter okay so let's go up here and then let's uh we're going to copy and paste some things just need to find where where it was oh here so we're going to copy and paste all this so contrl C this will save plenty of time you guys don't even understand let's contrl + V right and then I'm just go through make sure everything is uh correct so party name of course you know we want to make sure the party name we want the leave and spand button you know set the visible then the create party uh button and text box that those equal to false then for the player text label parent this to the part M's
34:01 frame the text equal to the text equal to oh here's the difference player name this what I meant when I said I had to make sure I was paying attention player name why am I putting spaces I just realized that that is actually going to mess things up think about it I can already I can already yeah I don't want no spaces yeah I don't want no spaces with the um with the names of anything thing because I already know this going to mess stuff up so let me just double Che oh Jesus yeah cuz I already know that is that is just going to mess things up I don't even know why I was doing wait is that actually how I wrote it cuz then that's a different story if that's actually how I wrote it let me see actually no that that that's not yeah not how I wrote it yeah I don't
34:48 know why I did that but yeah make sure you guys don't make sure you guys definitely did uh didn't do like how I did it in terms of that make sure there's no space why did I put spaces I don't know why I why I put spaces but if there's any issues then we can just come back um so I oh no I actually did do that right here okay so I guess I'll leave that there yeah we can leave that and then good news guys we are done on the client side yeah I believe this was it just need to make sure there text skill the text color background color okay guys now for the serde we're already like we're 35 minutes in oh yeah this video is going to be like a close to an hour not going to lie go ahead and insert a server script and this is just
35:35 me praying that I didn't type anything wrong either so let's go ahead insert the server script and let's do party scripts parentheses server I didn't even double check okay I'm good so let delete print hello world I honestly only need two variables first is the party remote event so party event is equal to game or licated storage wait for child party event then the parties folder plural we going to say game the server storage child parties right and then I'm going to set up the function to say party event on server events connect function in parentheses put player comma event type comma ar1 arc2 short for argument
36:21 and then definitely on the server side yeah I feel like this will be a little more confusing for people because got we use yeah I used a lot of for I Loops used a lot of for I Loops but the good thing I will say is that you can definitely do a lot of copy and pasting I'm going to say if event type first things first is equal to guys right now we went the same order that we did on the server side that's how I made it create a party first thing we're going to get is the party name we need to double check some things so we're going to say if number of parties folder get children is equal to zero meaning that there are no parties currently and of course and party name is n equal to blank right because we you know we
37:07 wouldn't want it we wouldn't want a person trying to create a like a blank party and stuff like I know a party with like no name pretty much you probably would also want to have like a table of like just not acceptable names like blank space two spaces yeah stuff like that but anyway um we're going to we're going to create a party folder so party folder and there are a lot of party like there a lot of words with you know party party event party folder party name party folder because you really got to pay attention to this stuff like how party folder parties folder so yeah guys just please pay attention so yeah so I'm going to say party folder is equal to instance. new folder I'm going to parent this folder to the parties folder right
37:53 then I'm going to say party folder. name is equal to is equal to of course the name of the party then I'm going to create the player D player data or player info I'm always player info is equal to instance. new then a string value right then I'm going say comma I'm going to parent it of course to the party folder then set the the info simply we're setting the name equal to the player's name and then we are setting the value equal to their position within the party so since this is the create party function this means the player is the leader of set party then I'm going to set up an El of statement inside of this event so I'm going to say else if number else if number parties folder get
38:40 children all right it's greater than equal one meaning that there's uh at least one party um created and there may be more and of course party name course party name or sorry party name n equal to blank enter right then did it yeah okay and then use the for Loop so for comma V impairs then inside of it I'm going to say Pary folder get children enter and I'm going to say if not V find first child player. name pretty much making sure that the player is not currently a part of any other parties and not Pary folder first child party name which
39:28 ensures that the there's not already a currently existing party with that name then here's what I mean control C control them all right um and then to my knowledge we don't have to yeah no we don't have to change anything with that all we simply have to do is just fire their more event wait oh I just real I forgot to do that my fault guys I forgot to do it here so uh put a space in between then you want to say party event we want to fire client so fire client then we want to say player send a we're firing it to the specific player who just created a party then party created this is going be when I said this event is only for people who for the party leader who just created the party then we're sending over the party name uh contrl c contrl v then same thing there now on to the next
40:16 event we have the leave this band this band party which takes up a lot of lines in my opinion so make sure you click the right arrow so enter Then I'm say else if event type is equal to leave slash disband party enter right then I'm going to say wa actually I'm pretty this is where I was able to copy and paste if I'm not mistake yeah okay we're going to copy and paste yeah yeah we're going to copy and paste and I'm going just try my best let's just really pay attention so that that I just know like not making a mistake okay so go back here right you want to take this lse if and then just copy and paste it so which STI yeah I was right so
41:01 contrl + C contrl + V obviously you're going to remove the else and then just put a space so you can just tell the difference so the difference with this is we're going to say if the party folders you know is greater than you know is greater than equal to one then is greater than equal to one we can remove this part then we're going to use a 4i loop the parties do and then do if the moved in you know if not if V find first child player. name move this hope this is honestly easier in my opinion it's like it's saving saving some time may be a little difficult but saving some time then we're going to create uh the player info so delete the party folder and then we're going to create a variable for the player info player info
41:48 is simply going to player info is simply going to be V find first child player. name you guys can can delete all this delete that right there then once you have the player info we're going to say if player info. value is equal I me do that info info. value is equal to leader meaning they're the leader of the party you guys can go ahead and delete that right if the person is the leader of the party then we're going to use another loop another 4 I Loop so 4 I2 comma V2 impairs once you get get confus used with these and then I'm going to say player info. parent which is referring to the party as a whole it's
42:35 children uh enter on the outside then I'm going to say aame that players find first child v2. name which is referring to the player then we're going to fire the client so party events fire clients copy and paste this contrl c contrl v right we're going to fire client there with V2 name then put a comma in between and then for this it's going to be party disband here's how we tell the difference if we're disbanding a party or just a player is leaving comma player info. new I mean new name I feel like we really save a lot of time with just the copy and pasting then we need to uh set up the lcf statement for this so we need to pretty much go up here to the if statement with the um right
43:23 here and then we're going to say else if player info as you guys probably guessed that value is equal to member mean all all we're trying to do is is you know we're just the player is just leaving you need another 4i uh 4 I2 V2 Loop so control c v boom so since it's so since it's simply just a member we're going to know get to play info get the parent then we're going to fire it to all of the people and then only thing we're going to change is change this to party leave play info name and then and then oh yeah yeah I forgot this forgot this actually so we're going to destroy just the player info so so that we know that the players already left then make sure you
44:10 go back up here too and then do player info this time do parents CU this means we're destroying the entire party folder not just uh the specific players info and yeah see I really feel like we just saved hell of time like with that cuz honestly it's a pretty big event but I feel like we just saved a lot of time by cop but anyway onto the next event we're already like so the script has the script has 100 yeah okay we're like we're one3 of like one a little bit over one3 of the way there so yeah making good progress so I'm going go to the next uh thing where's the El where's the El stuff can't I'm trying not to get confused okay there we go so after leave and disband party have to leave in party we have the invite player event which is honestly it's not that much so player so
44:56 enter we're going to say local invited player name is of course equal to argument number one then I'm going to use a 4 Loop I'm going to say 4 IV impairs Pary folder get children enter then I'm going to say if V find first child player. name and the find first child let's see find first child player that name. value is equal to leader and now this PR means to that the only people that can invite uh the only people that can invite people to parties are one people in a party and two people
45:42 whose value set the you know the leader and we need to of course make sure the my first child not you know invited player name which means the player is not the person that invited is currently not in the party because you can't invite players that are currently in parties but yeah then we're going to use another 4 i2v Loop so we can copy and paste this uh contr C control V delete that portion then the difference is for this I'm going to uh do game. players get children so game. players get children then I'm going to say I'm change the if statement I'm going to say if V2 name is equal to invited player name
46:29 then party event fire CL make sure you're paying attention to like when I'm doing fire all clients and fire client majority of these are fire client anyway yeah so once I've done that we can delete this and then just put V2 change the name of the event to invite player and then simply we're just send over V that name so name of the player and oh I did that wrong You2 that name right I will genely be shocked if I like actually like no issues but time I done with this then moving on on to the next event else if event type is equal to invite accepted right so on we have the uh you know when you accept an invite so and actually now think about
47:15 it this is really the long last function when I think actually no this is the last this is the I believe it's the last event I think yeah this yeah this is this is the last event so I'm going to say local invited player is equal to ar1 local party name is equal to R2 this event was actually the reason why I needed a second argument um and then we're going to like I said we are going to save time and I hly oh yeah oh actually we better save so much time I don't even understand okay so we're going to go up here right we're going to go back to the leave disand right and you're going to just take everything from there control+ C I'm going double check to make sure everything is good but I'm pretty sure that that I literally just use the same
48:01 exact thing so here then for Loop parties folder if you find first charm layer info yeah I'm pretty sure I just used the same thing CU essentially they literally just do the same as long as everything just checks out then it's literally just doing the same thing yeah the par destroy cuz if you're accepting the invite uh we need to make sure oh yeah okay okay okay you can accept yeah you can't accept it this is to make sure that it would just uh wipe out your information if if need be okay oh yeah I just sa hell time I just saved this hell time because now we don't even have to yeah we don't have to do none of that save this 20 lines 20 lines of scripting okay so moving on after we've done that now we have to
48:47 type this but this this really isn't anything at all honestly first things first we're going to set the party folder so party folder is equal to Pary folder folder find for sh or not set it up we're more so looking for it so party name then we're going to get the players info by searching the party folder I should probably guessed is equal to uh party folder when I find it party folder and then oh sorry no no no we're creating it sorry instance. new string value parent then yeah parent it to the party folder enter Then player info just like we did before. name is equal to player. name differences is time the value is equal to member not leader right and last thing a for two 4
49:34 Loops so 4 i v impairs then I'm going to say this took me so long you guys understand how long it's figure this one out literally I like send tables over from server to client it was a lot anyway 4 I2 V2 impairs then I'm going to say game players get children enter and we going to say if v. name is equal to v2. name enter right then you guys AR even going to believe it I'm using a uh what's it called I'm actually going to use a wait IIT why did I do that oh never mind I see I did it 4 I3 V3
50:21 impers party folder again make sure you're doing the right party party folder get children do party event buyer client V2 new member wait where's the oh I'm stupid I'm stupid typing this new member comma v. name comma the name of the party right let me just double check something so party folder get children so okay so we so those the player instances party folder wait I'm so confused why did I do this again oh yeah yeah I remember now I remember now it was to make sure that it just uh went over each time yeah okay
51:07 yes so yes so it fired every time okay all right guys great news we're not done but we almost done I promise we almost done okay this this is for the function oh not really much to do you're just copying and pasting all you're doing is game do players St player removing connect function parentheses put plr enter boom you're almost done literally go up here just copy and paste this like we do just CU remember this is the whole thing that handles when players leave and stuff so paste boom this is for when a player leaves the game if they were the leader of our party it'll destroy the party if they were a member of the party it'll just remove all the information and stuff guys we're done another video was like an hour long I'm sorry but I I
51:53 mean maybe I found a way to shorten it in the future but to be honest I don't do well with complex systems I was honestly surprised I was even able to get done but as always let's go ahead and see as always if you guys want access to any of my scripts and models you guys can become either a channel member or a Discord subscriber links to either one of those options can be found in the description and stuff um you guys should definitely join the Discord server we're almost at 1 th000 members so if I press P you guys see um I'm not going to test the full thing because then I have to set up a server and it be whole thing I'm just showing you guys the party system that works go on the server side you guys see you have the party's folder nothing there but then if I obviously if I do this nothing happens but if I type party one enter create a party boom party name party one spy1 19
52:38 that's my name then the uh the button the create party and the party text box disappeared and I can leave and I have the option to leave you guys see party one then inside of the folder wait what whoa oh see yep I did something wrong this why I'm glad I tested it I did I definitely did something wrong whoa it like just took over it like literally took over the folder then in oh I see what happened oh no no I see what happened I changed the name I changed the wrong name that's what I did I put yeah okay I see what I said they're wrong okay so here here's why it's always great for me to test let me go back to create party go back to create party I know exactly what I did wrong yeah here we go so make sure you make
53:24 sure this is party folder make sure party folder not party folder not even surprised cuz I made that mistake a lot when I was just uh coming up with this but yeah so let's go ahead let's create the party let's see now so if I create party one it should yeah parties then the name of the party my name my name as the value I mean my name my username as the name and then the value is my position or rank within the team the leader then if I leave okay yep there we go that is actually crazy someone literally was asking me for helping and they literally made that same mistake but the difference was for me I just accidentally did it but anyway um yeah so make sure that's a colon not a period I'm glad I did this just figured out to thing you okay okay so it won't
54:10 really matter so I was right to put that but it won't but it won't really matter because if it just it's not a member yet then it's not going to break the script or anything so if I leave now boom there we go okay so there should be nothing or not there okay there we go there's nothing all right so it's everything seems to work so far uh if there are any issues let me know I got y you guys can join my Discord server for help as always if you guys need access I mean you guys need help with anything just join my Discord server link you find the description you guys can join for help I know definitely a lot of people are going to need help as this was definitely very conf very confusing very complex and yeah thank you guys for watching leave a like And subscribe if you enjoyed thank you guys for all the love and support I've been showing and I will see you guys in the next video