Hello I'm trying to figure out how to get all players connected on a server too show up in a custom made gui?
Like for example. A drop down menu. You click that shows a list of all the players currently online and you can select one. Then everything else you select in the gui is for that player you selected only.
So lets say I make me a custom admin gui for my server.
In that gui I got all kinds of commands.
I click my dropdown menu in my custom made gui select "DonaldBuck" whos currently online and connected to the server then click a button called 'God mode' and it makes only him have god mode in the server
thanks
Using a for loop, loop through the players and add each one to the list. Here's some sample code.
local list --Your container for your list of players local sampleLabel = dropDownMenu.SampleLabel --An invisible sample label at the top for i, player in ipairs(game.Players:GetPlayers()) do local label sampleLabel:Clone() label.Text = player.Name label.Position = sampleLabel.Position + UDim2.new(0, 0, sampleLabel.Size.Y.Scale* (i - 1), sampleLabel.Size.Y.Offset * (i - 1) ) --Position the label based on the player index label.Visible = true label.Parent = list end