Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How can I make a working server matchmaking system?

Hello! I need to make a server matchmaking system for my game but I'm not that good at scripting so I don't know how to do it. Can someone help me?

2 comments

0

Do you have your own idea of what you want to do? It's reasonable to have bad scripting skills but you dont have your own idea...

0

Yes. I'm not a scripting beginner. I know the basics of ROBLOX scripting, but I don't know so much further. My idea is to make a server matchmaking system like Elimination Tower, Eviction Notice or Outlaster.

1 answer

✓ Accepted answer

This can probably help:

if #myTableName > 1 then
	local playerIndex = math.Random[1,#myTableName]
	local nextplayerIndex = math.Random[1,#myTableName]
	repeat
		if nextplayerIndex == playerIndex then
			nextplayerIndex = math.Random[1,#myTableName]
		end
	until nextplayerIndex ~= playerIndex
	
	local player1 = game.Players[myTableName[playerIndex]]
	local player2 = game.Players[myTableName[nextplayerIndex]]
	-- Proceed to teleport players.
end

This discussion is preserved as it was. New answers, comments, and votes are closed.