I am looking to create a map vote gui system within the next few weeks. (Depending on how hard it is to create)
What is the most efficient way to do this and what will I need to know? (Wiki links would be very helpful if you don't want to explain everything yourself)
The general idea I had behind this was a main script in workspace that would find the maps in lighting using 'game.Lighting.Maps:GetChidlren' then to randomly pick 3 to vote on. (There would be 3 IntValue's located as a child of the main script 'MapVote1','MapVote2' and 'MapVote3').. Each time a player clicks the gui, it would run a check to see if the player has already voted, if not.. then it would award the IntValue of that map +1 and it will update using .Changed event. It would have a 25 second countdown and after that's up, it would find what one has the highest vote and it would clone that map, delete the old one and the new one would get made. It would then reset all votes for the 'Maps' and the 'Voted' IntValue inside the player.
Would that idea be efficient? Or is there a better way of setting this up?
Map = game.Lighting.Map:GetChildren() maps = {} for i = 1,#Map do table.insert(Map[i].Name,maps)-- Inserts name end for i,v in pairs(game.Players:GetPlayers()) do v:WaitForDataReady("StarterGui").ScreenGui.z.Text = maps[math.random(1,#maps] -- z is the TextLabel do it for yourself -- You can get creative :) edit this to your choosing.
This is a basic layout you can work on for your self
-- You can work make multiple makes by increase this number print(maps[math.random(2,#maps]) -- This will print 2 random maps.
I'm guessing you can work your way around this and get createive, best wishes HexC3D. :)