of     1   

greencoolman8
#141747619Sunday, July 27, 2014 6:42 PM GMT

I am not asking to give me one. Anyhow, I've made this minigame kind of game. And it chooses a random map. But now, I want a Map vote thing like MM (Murder Mystery). The idea is how can I accomplish that?
KEVEKEV77
#141748926Sunday, July 27, 2014 7:00 PM GMT

Make a GUI vote! Make a gui in lighting named VOTER Script in workspace: Votes = Instance.new("Model", game.Workspace) Votes.Name = "Votes"; function Vote() for i,v in pairs(game.Players:GetPlayers()) do game.Lighting.VOTER:Clone().Parent = v.PlayerGui; end end if somehowthevotingtimeisready then--change this to whatever you do to check if its time to vote Vote() repeat wait() until #game.Workspace.Votes:GetChildren() == game.Players.NumPlayers wins = {"","",""}--Put whatever you put in the strings HERE EXACTLY what the values are. counts = {0,0,0}--however many indexes the table wins has for i,v in pairs(game.Workspace.Votes:GetChildren()) do for u, p in pairs(wins) do if p == v.Value then counts[u] = counts[u] + 1; end end end for j, k in pairs(counts) if k == math.max(unpack(counts)); then winind = math.max(unpack(counts)); WINNERMAP = wins[winind]; -- will choose the string map. end end if WINNERMAP == "AMAPSNAME" then chosenmap = game.Lighting.MAPTHATMATCHESITSNAME end if WINNERMAP == "AMAPSOTHERNAME" then chosenmap = game.Lighting.MAPTHATMATCHESITSNAME end --And so on. so, chosenmap will be the value with the map in it. end ok in vote, have buttons with the maps names and or images of them. Put a stringvalue of what the map's name is in the gui button and name is Val Then In each button, have this code: script.Parent.MouseButton1Click:connect(function() script.Parent.Val:Clone().Parent = game.Workspace.Votes; script.Parent.Parent.Parent:remove()--remove the gui. You may want to change this, incase you do not parent things or do. --Removes so you can only vote once. end) I hope this all works!
KEVEKEV77
#141752321Sunday, July 27, 2014 7:39 PM GMT

Oh, last thing, put this after where it says --And so on. so, chosenmap will be the value with the map in it. put game.Workspace.Votes:ClearAllChildren();

    of     1