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

How to make 2 players face each other? (LookVector not Reversing)

player2.Character.LowerTorso.CFrame = player1.Character.LowerTorso.CFrame + player1.Character.LowerTorso.CFrame.LookVector * -5

I have this code to teleport player2 to player1 and it works, but player2 teleports facing the same direction as player1, I want them to face opposite directions so that they are facing each other but the lookvector won't reverse. How would I do this?

1 answer

Vector maths is a pain.

If you want to rotate a vector by 180 degrees (i.e pi radians) the easiest way would be to multiply by a CFrame.Angles in which one of the axes are math.rad(180) and the other two are zero.

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