Party System - Updating Party List

I’ve created a system that allows player to party up in-game by storing information in a folder named after the party leader, the folder contains 4 values each value representing a space in the party, the values are named “Member1”, “Member2” and so on. I have a GUI that I want to display the players within that party, update when a new member joins/leaves, does anyone have any idea how I would go about doing this? It needs to update for each member of that party too.

I’m guessing from “I’ve created a system…” you’ve already set up players joining/leaving the team. In a local script in the GUI you need to check to see if the Member values change then update the textlabel on your GUI accordingly

Could look something like this (inside a local script)

for i,v in ipairs(foldername:GetChildren()) do -- assuming all children are variables
   v.Changed:Connect(function() -- checks to see if party members variables in the folder are changed
      GUIName.Frame[v.Name].Text = v.Value -- changes the text of the textlabels in the frame assuming the labels are named Member1, Member2 and so on
   end)
end

You could use PlayerLeaving for when someone leaves the game then have some sort of function that handles players leaving the party and fire that when PlayerLeaving is fired, you can also have some sort of leave button that fires the function that handles player leaving the party and fireclient to update the GUI. As for joining it’s pretty much how you set up your system, for example the part where you add a player to the party within that function or code you can fireclient to update the GUI.