How would I make a part face the same direction as the character?
Asked by
6 years ago Edited 5 years ago
So, I have created a pet that follows the character around. I want it, however, to face the same direction that the character is facing at all times (so you can see the face of the pet). I believe this will involve changing the x-axis of the orientation of the pet to the that of the character's HumanoidRootPart or changing the x-axis of the orientation of the pet to the character's HumanoidRootPart's lookVector. I am unsure how to do this and have tried asking on the Discord, but to avail. Here is the code I am currently using in a Script to move the pet to near the character's head:
3 | bodyPosition.Position = character.Head.CFrame:pointToWorldSpace(Vector 3. new( 2.5 , 1.5 , 0 )) |
bodyPosition is a BodyPosition inside of the pet. Please help, thanks!