Grab 2 players and put them in 2 places facing eachother

so i have an arena game mode that is 2 players per server, and what i would like to do is move both players in 2 spots facing eachother
the problem is, i dont know how to select each player and put them in a specific spot
i have not found anything similar to this and need help

thank you for reading and i hope someone can help me

3 Likes
local Player1Joined = false
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
if Player1Joined == false then
Player1Joined = true
char.HumanoidRootPart.CFrame = 1stSpot.CFrame
else
char.HumanoidRootPart.CFrame = 2ndSpot.CFrame
end
end)
end)
2 Likes

how would i do 2 different spots tho

1 Like
local Player1Joined = false
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
if Player1Joined == false then
Player1Joined = true
char.HumanoidRootPart.CFrame = 1stSpot.CFrame
else
char.HumanoidRootPart.CFrame = 2ndSpot.CFrame
end
end)
end)
1 Like

If you want to make them look a certain direction, then just rotate the front face of the two parts that the player spawns at to face each other.

1 Like

Just make sure the CFrame is rotated before setting the player’s character position to it.

local CharacterCFrames = {
CFrame.new() * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0));
CFrame.new() * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0));
};

local SetCharactersCFrame = function(Players: Table)
for Index, Player in Players do
local Character = Player.Character or Player.CharacterAdded:Wait();
Character:PivotTo(CharacterCFrames[Index]);
end;
end; 

SetCharactersCFrame({Player1, Player2});
1 Like