I want to make a gui that can display all the members you have inside a squad/party. I have the party inside of a folder in ReplicatedStorage. How can I make it so that it would display all the members inside of the party?
Hi!
It looks like you’re trying to put the names of the party members into a UI. This can be done the following way:
Step one. Create a template text label, this is will be what we’ll use later on to put the players names in the UI.
Step two. Use a UILayout modifier, such as: UIListLayout | Roblox Creator Documentation or UIGridLayout | Roblox Creator Documentation this will make it easier to keep everything nice and neat.
Step three. Let’s make the script to get this working.
local folder = game.ReplicatedStorage.PartyFolder
local texttemplate = script.TextTemplate
for i,v in pairs(folder:GetChildren()) do
local newPlayer = texttemplate:Clone()
newPlayer.Parent = (Your GUI)
newPlayer.Name = v.Name
end
This will technically work, but isn’t dynamic enough for a live game. (It doesn’t remove players when they disconnect). I encourage you to do the reading required to make a fully functional system on your own.
Please let me know if you have any further questions
I will use childadded and childremoved