Hello! I am working on a map voting system and am almost finished except for this one issue, whenever a player clicks to vote in a test server of 3, either 3 votes are cast or 4 per person voting. I don’t know why this issue is happening and I would really appreciate help with this!
local votes2 = game.ReplicatedStorage.mapVoteStuff.Values.Votes2
local votes3 = game.ReplicatedStorage.mapVoteStuff.Values.Votes3
local vote = game.ReplicatedStorage.mapVoteStuff.Values.Vote2
local player = game.Players.LocalPlayer
local map1 = player.PlayerGui.MapVote.Map1
local map2 = player.PlayerGui.MapVote.Map2
local map3 = player.PlayerGui.MapVote.Map3
local db = false
script.Parent.Activated:Connect(function()
if db == false then
db = true
map1.VoteButton.Visible = false
map2.VoteButton.Visible = false
map3.VoteButton.Visible = false
vote:FireServer()
wait(5)
db = false
end
end)