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.
Line 6: game.Players:GetPlayers(player)
The GetPlayers function does not take any arguments. You are passing in "player" which is undefined in the script you've shown.