Changing CFrame is inaccurate

i have a script that plays an animation on 2 players, and for the animation to look good, i have to position the characters correctly. however whenever i try to position using CFrame its innacurate and off.
this is the code im using:

		char.HumanoidRootPart.Anchored = true --PLAYER2
		print('anchored bb')
		human.WalkSpeed = 0 --PLAYER1
		hrp.CFrame = char.HumanoidRootPart.CFrame --PLAYER1
		hrp.CFrame = CFrame.lookAt(hrp.Position,, hrp.Position.Y, char.PrimaryPart.Position.Z)) --PLAYER1

the character should be inside the other character (there are no collisions) and the other character should be facing the character

1 Like

Remove this line here, it’s unnecessary.

In what way is the CFrame inaccurate / off?

What is this code supposed to do and what is happening currently? Is char the other player?

Char is your player character, “other char” is a NPC

so this is positioning for a gameplay cutscene that happens

your forgot to put the line, but im assuming your talking about the lookAt function
that line makes the NPC face the char so i dont really know why i included it in this post

the npc and character should be directly inside of eachother, however the NPC is always slighty looking a different direction and is off by around a stud

Honestly, have no idea how I managed to forget the line xD. But yeah, it as the lookAt thingy. The HRP should already be lined up correctly because you previously used CFrame instead of position. (CFrame includes orientation)

Does removing the line from the script have any effect?

removing the LookAt line doesnt change anything

still needs to be fixed bruh :man_shrugging: