AlignOrientation not working as intended

Trying to make player’s HRP face the wall that they are positioned on. How can I fix my code so that it works as intended?

					attachment0Orientation.Name = "Attachment0Orientation"
					attachment0Orientation.Parent = hrp
					attachment0Orientation.Position = Vector3.new(0,0,0)
					
					local attachment1Orientation = Instance.new("Attachment")
					attachment1Orientation.Name = "Attachment1Orientation"
					attachment1Orientation.Parent = wall
					attachment1Orientation.WorldPosition = raycastResult.Position
					
					alignPosition.Attachment0 = attachment0
					alignPosition.Attachment1 = attachment1
					alignOrientation.Attachment0 = attachment0Orientation
					alignOrientation.Attachment1 = attachment1Orientation

Make sure you set the LookAtPosition property of AlignOrientation.

I’m confused as what I would set it to. I’ve tried setting it to my raycast intersection(raycast.Position), but the problem persists.

					local alignOrientation = Instance.new('AlignOrientation')
					alignOrientation.LookAtPosition = raycastResult.Position
					alignOrientation.Parent = hrp

–Bump–

–Characters minimum–

AlignOrientation.CFrame = CFrame.lookAt(HRP.Position, Wall.Position)

Make sure the AlignOrientation has enough power to rotate your character as well,

Also set the AttachmentMode to OneAttachment as well

Bump.
I’ve been experiencing the same bug as was described in this thread that is now closed:

When messing about in playtest and using explorer, if I try modifying the align orientation properties, it seems to snap out of it and align correctly. But never via my script code, even if I try to enable/disable the instance.