So I have a menu that's supposed to pop up and the players can click on a player to vote to eliminate them. It kinda worked before, but I changed it because it started from the bottom up. I'm trying to get it to go from the top down. Here's the script

local pplforgui = game.Players:GetPlayers()
for a, b in pairs(pplforgui) do

	local votegui = game.ServerStorage.VoteGui:Clone()
	votegui.Parent = b.PlayerGui

	local people = #pplforgui
	local counter = 0
	for c, d in pairs(votegui.Buttons:GetChildren()) do
		counter = counter + 1	
		if counter <= people then
			if d.Name == ("Person" .. counter) then
				local personforbox = pplforgui[counter]
				d.ImageLabel.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&username="..personforbox.Name
				d.TextLabel.Text = personforbox.Name
			end
		else
			d.Visible = false	
		end
	end
end

Here's the explorer for the gui https://imgur.com/KODMjWU

If any more info is required, I'll try to supply it.

2 comments

0

do you want all the players in the server to be up for elimination or just a portion of the players?

0

All of them