What I need is a way to make a script that will check the amount of players in the server, do a countdown and execute another script that teleports 2 random players that are in the game to 2 destinations (222.598, 73.536, -925.25 and 222.598, 73.536, -876.25) and after the two players are teleported, they receive swords and duel.
I have tried numerous amounts of code from many different sources, but every single one of them has failed. I do have a little bit in knowledge of Lua, but I've just now learned that knowledge.
This is one of the codes that I have tried.
players = game.Players:GetChildren()
players[math.random(1, #players)]:MoveTo(Vector3.new(222.598, 73.536, -876.25)
players[math.random(1, #players:MoveTo(Vector3.new(222.598, 73.536, -925.25)

6 comments
Only one of the players were teleported
Ah, sorry about that. I fixed it. It should work now.
I removed the 'while Plr1==Plr2 do --Repeats until Plr1 is different than Plr2' bit and it worked.
Thank you for helping me out, as it is working. Now I need to peice together a round system and something to detect if the player is dead.
No prob. Glad I could help. If you need any help with either of those, i'd be glad to assist.
I recommend implementing each part (The teleporting, and the get player) into seperate functions. This would be easier later on so you can call them in the rounds. ie PickPlayers() then Teleport().