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

Aligning character's torso to another part?

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!

2 comments

1

So what exactly didn't work with CFrame.new(position, lookAt)?

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.

1 answer

✓ Accepted answer

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!

2 comments

0

I have and I completely forgot to test other directions. It works wonderfully. Really big mistake on my part, thank you.

0

My pleasure. : ) Leave a thumbs up!

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