Forest = game.Lighting.Forest
Trusses = game.Lighting.Trusses
Maps = {Forest, Trusses}
function ChooseMaps()
game.Players:GetPlayers(player)
randmap1 = math.random(1, #Maps)
randmap2 = math.random(1, #Maps)
while randmap1 == randmap2 do
randmap2 = math.random(1, #Maps)
end
player.PlayerGui.VoteMap.Frame.Map1.Text = Maps[randmap1].Name
player.PlayerGui.VoteMap.Frame.Map2.Text = Maps[randmap2].Name
player.PlayerGui.VoteMap.Frame.Visible = true
end
Okay, so, I don't think anything in this script it working. What it's supposed to do is it's gonna pick a random two maps out of the table "Maps" (yes, I'll add more), and then have the name of the maps be on the buttons on which you would vote for which one you would want most (adding that later), and then make the whole Gui visible. But NONE of this seems to be working... And nothing's showing up in the output either.
If you could figure out what's wrong with this, I would be very grateful.

3 comments
So then what WOULD work for what I'm trying to do?
Okay, but what would I do to FIX it? What would I replace that with?
It depends on what you are trying to do. Is this a Localscript or a server script? Is this single script responsible for displaying the gui to all players or to just the local player?