How can i Fix my Code

so i have this Script that Picks A map And When timer stops it picks 3 Random Maps And The players Will have to Vote One But When you voted the maps equaly it dosent Put A Map So how can i fix it
this is the Script

local rep = game:GetService("ReplicatedStorage")
local Mapsfolder = game:GetService("ReplicatedStorage"):WaitForChild("Maps")

local booleans = rep:WaitForChild("Booleans")
local variables = rep:WaitForChild("Variables")
local choice1 = variables:FindFirstChild("Choice1")
local choice2 = variables:FindFirstChild("Choice2")
local choice3 = variables:FindFirstChild("Choice3")
local winner = variables:FindFirstChild("Winner")
local timer = game.ServerStorage:FindFirstChild("Value").Value

while true do

	local Maps = Mapsfolder:GetChildren()

	choice1.Value = Maps[math.random(1,#Maps)]
	table.remove(Maps,table.find(Maps,choice1.Value))
	choice2.Value = Maps[math.random(1,#Maps)]
	table.remove(Maps,table.find(Maps,choice2.Value))
	choice3.Value = Maps[math.random(1,#Maps)]
	table.remove(Maps,table.find(Maps,choice3.Value))
	wait(1)
	booleans:FindFirstChild("VotingSession").Value = true
	wait(10)
	booleans:FindFirstChild("RevealVotes").Value = true
	wait(5)
	booleans:FindFirstChild("VotingSession").Value = false
	booleans:FindFirstChild("RevealVotes").Value = false
	local chosenmap = winner.Value
	local map = chosenmap.Value
	local clonemap = map:Clone()

	if not winner.Value then
		game.ServerStorage.Value2.Value = 0
		game.ServerStorage.EndValue.Value = false
		break
	end

	print("Getting map...")
	game.ServerStorage.NameValue.Value = map.Name 
	wait(1)
	print("Getting map spawn...")
	clonemap.Parent = workspace
	for i = timer ,0,-1  do
		if game.ServerStorage.EndValue.Value == true then
			game.ServerStorage.Value2.Value = 0
			game.ServerStorage.EndValue.Value = false
			break
		end
		game.ServerStorage.Value2.Value = i
		wait(1)
	end
	game.ServerStorage.NameValue.Value = "Choose a Map!"
	clonemap:Destroy()
	wait()
end