Matchmaking Queue

Hello,

Any Help Would be great, I dont know where to start I can do everything else but matchmaking. I’ve been trying to make a matchmaking queue for a little while now.

local LastMatchMakingPlayers = {}

local GameModesData = require(game.ReplicatedStorage.GameModeData).GameModes

local TS = game:GetService("TeleportService")

local MatchingTime = 7.5
local MatchingPlayerMax = 100

local GamePlaceID = 0

while true do
	for i,v in pairs(game.Players:GetChildren()) do
		if v.DataFolder.Ready.Value == true then
			v.DataFolder.CanReady.Value = false
			
			game.ReplicatedStorage.Client_GET_Requests.GET_MatchMakingUpdate:FireClient(v, {String = "MatchMaking Service Connected", HideInt = 99999})
			
			table.insert(NeededMatchMaking, v.UserId, {GameModeSelected = v.DataFolder.GameModeSelected.Value})
			
			if LastMatchMakingPlayers[v.UserId] then
				LastMatchMakingPlayers[v.UserId].Trys = LastMatchMakingPlayers[v.UserId].Trys+1
				
				if LastMatchMakingPlayers[v.UserId].Trys == 4 then
					v.DataFolder.CanReady.Value = true
					v.DataFolder.Ready.Value = false
					LastMatchMakingPlayers[v.UserId].Trys = 0
					
					if v.DataFolder.isPartyLeader.Value == true then
						v.DataFolder.CanChangeGameMode.Value = true
					end
					
					game.ReplicatedStorage.Client_GET_Requests.GET_MatchMakingUpdate:FireClient(v, {String = "MatchMaking Service Failed", HideInt = 7.5})
				end
			else
				table.insert(LastMatchMakingPlayers, v.UserId,{Trys = 0})
			end
		end
	end
	wait(MatchingTime)
end

game.Players.PlayerRemoving:Connect(function(Player)
	if table.find(NeededMatchMaking, Player.UserId) then
		table.remove(NeededMatchMaking, Player.UserId)
	end
	
	if table.find(LastMatchMakingPlayers, Player.UserId) then
		table.remove(LastMatchMakingPlayers, Player.UserId)
	end
end)

I need to find a way to run matchmaking off of GameModesData.Holder1.GameModeID

-Glue