Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

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

Asked by 6 years ago

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

Closed as Not Constructive by theCJarmy7, Programical, and Shawnyg

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

2 answers

Log in to vote
0
Answered by 6 years ago

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

0
Yep it is MooMooThalahlah 421 — 6y
0
post this as as a comment not an answer wookey12 174 — 6y
Ad
Log in to vote
0
Answered by 6 years ago

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.

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. Skyraider5 -21 — 6y
0
Follow up question, will this code actually do it or do I need to edit it to make it work? Skyraider5 -21 — 6y
0
If your Teams Service and Teams are set up then this will work MooMooThalahlah 421 — 6y
0
ok thanks I'll give it a try Skyraider5 -21 — 6y
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? Skyraider5 -21 — 6y