Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Aligning character's torso to another part?

Asked by 9 years ago

EDIT: Quite a mistake on my part there! Didn't realize that having the part rotating to the other part would automatically align them. My observation skills probably need improving, ha ha!

Hello. I am making a tool where I need the two players to be facing each other precisely and I'm having a bit of trouble finding out how to align one player's character to another.

I have been able to make the players face each other by using the position of the player's torso and the position of the other player's torso to produce a CFrame that rotates the player to face the other player, but I am struggling to find out how I can align the players precisely, regardless of where they are at.

I'm confident I have to use CFrame, but I am not sure how I use CFrame to align the player's torso to the other player's torso. If someone could point me in the right direction, I'd really appreciate it.

Thanks in advance!

1
So what exactly didn't work with CFrame.new(position, lookAt)? Perci1 4988 — 9y
0
It did work, it's just that it only rotates the player to face towards the other player. I need to know how to align the player's torso to the other player's torso so they're in line with each other. Spongocardo 1991 — 9y

1 answer

Log in to vote
1
Answered by 9 years ago

Try making a script that makes the two players face a certain direction. Then all you need to do is make one player face the opposite direction. Since there are only two players, no matter where you put them, they will always be aligned. It isn't geometrically possible for them not to be!

0
I have and I completely forgot to test other directions. It works wonderfully. Really big mistake on my part, thank you. Spongocardo 1991 — 9y
0
My pleasure. : ) Leave a thumbs up! iUnEarthly 85 — 9y
Ad

Answer this question