How to Make Person Quenue Only Once


Queue.OnServerEvent:Connect(function(Player)
	print("Added Player")
	if table.find(WaitingQuenue, Player) then return end
	
	table.insert(WaitingQuenue ,Player)

--	print(WaitingQuenue[1])

	local function GetMission()
		local missions = game.ServerStorage.Mission:GetChildren()

		local r = math.random(1, #missions)	
		if missions.Value == false then
		local mission = missions[r]
		return mission
		end
	end
	
	local function GetMissions()
		for i, v in pairs(game.ServerStorage.Mission:GetChildren()) do
			if not v.Value then
				print(v)
				return v
			end
		end
	end
	

Once a player clicks a table there added a table. I want the player to not be able to join the table more than once. If the player already in the table I want them to not be able to add to the table.

if table.find(WaitingQuenue, Player) then return end

That what I’ve tried. ^

Based on what you’ve posted here, this should be working. Are you sure that players are getting added to the table multiple times through this listener?

1 Like

Yeah you’re right it works. I had two tables so I had move to them to another table.