I want to make a system of matching two players who will fight each other. After the timer expires, 2 players teleport to the game area and begin the battle. Q: how can I do this? I’ve been trying to do this for the second day, but I haven’t seen anything like this on the forum that could help
1 Like
I will be glad of any help
You can just get all the players of the server, and just randomize an number based on the amount of players you have. Then it gets that player, and it teleports the players to like the arena
Do you can show the script and the error so i can fix the script?
2 is not a valid member of Player “Players.Szerpan”
You dont need a i,v in pairs for the players in the line 14
local choosenplayer1 = game.Players:GetPlayers(math.random(1,#game.Player:GetPlayers))
local choosenplayer2 = nil
repeat
choosenplayer2 = game.Players:GetPlayers(math.random(1,#game.Player:GetPlayers))
wait()
until
choosenplayer2.Name ~= choosenplayer1.Name
choosenplayer1.Character:PivotTo(clonemap.Teleport1.CFrame)
choosenplayer2.Character:PivotTo(clonemap.Teleport2.CFrame)
Thank you very much!. but why don’t I need i, v in pairs for players
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.