Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make a GUI that shows the names of the players?

Hi, I'm working on a game and I made a GUI but I am having a hard time with making a script that will make the names of all of the players on a certain team appear on the GUI. Basically, I want to make a GUI like in survival games where a GUI pops up after each round and says "Survivors" and then all of the survivor's names are listed. I need the GUI to show the names of only the players on the team called "Tourists". If anyone could help me with this I would REALLY appreciate it. Anyway, here are some important details:

The name of the GUI is SurvivorsGui Within the SurvivorsGui there is a Frame called SurvivorsPage and within that is another Frame just called Frame. Inside of that is one last Frame called WinnersList THAT IS THE FRAME WHERE THE NAMES OF THE PLAYERS SHOULD BE. Repeat THE PLAYER'S NAMES SHOULD APPEAR IN THE FRAME CALLED WinnersList Any help would be HUGELY appreciated, if you have any questions please feel free to ask in the comments below and I will answer as soon as I can. Thanks :) Skyraider5

2 answers

This is script helper not a request site, this question sounds more of a request.

2 comments

0

Yep it is

0

post this as as a comment not an answer

First you should get the Teams Service and your teams. Play with this code.

local Teams = game:GetService("Teams")
local MyTourists = Teams:WaitForChild("MyTourists")

for _,player in pairs(MyTourists:GetPlayers()) do
	print(player)
end

Everything else is self explanatory.

5 comments

0

Thx, I'll try it, Thank you for actually putting in an effort to help as opposed to just criticizing the question like Catforlife1 did.

0

Follow up question, will this code actually do it or do I need to edit it to make it work?

0

If your Teams Service and Teams are set up then this will work

0

ok thanks I'll give it a try

0

Ok, so I put the script into the WinnersList frame but the names didn't show up, can you think of any reason that this might have happened?

This discussion is preserved as it was. New answers, comments, and votes are closed.