-- After the voting period, determine the map with the highest count

local function determineWinningMap()
	local highestVotes = 0
	local winningMap = ""

	for map, votes in pairs(mapVotes) do
		if votes > highestVotes then
			highestVotes = votes
			winningMap = map
		end
	end

	-- Load the game with the winning map
	print("The winning map is: " .. winningMap)
	game.ReplicatedStorage.VotingEnded:FireServer(winningMap)
	-- Load the winning map using your game's specific logic
end
