Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Can you tell me this? [closed]

Asked by 8 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.
 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 

its for a vote for a different map gui the one with the most votes wins pls gimme the fixed version (useless stuff gone) or if its incorrect do the correct pls. can u do that or is it too hard?

0
could you please put your code in a coed block ProfessorSev 220 — 8y
0
ok loganv450505 0 — 8y
0
is that better? loganv450505 0 — 8y
0
Not only do you need a better title, you need better explanation. It does not help us at all if you do not tell us the intended outcome, the actual outcome, errors if applicable, and the direct source of the problem. Also, you're question seems more like a request since you request we give the correct version even if your script would not work in the first place. M39a9am3R 3210 — 8y
0
Sorry, but I don't find this constructive at all. ScriptGuider 5640 — 8y

Closed as Not Constructive by ScriptGuider, Pyrondon, and BlackJPI

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?