CFrame.lookTo() not (fully?) working

Hello! I have this code:

-- A position behind the player (but for some reason is in front lol)
local _pos =  _target.Character.PrimaryPart.CFrame * (-_target.Character.PrimaryPart.CFrame.LookVector * DISTANCE)
script.Parent:PivotTo(
    --            working?      not working, check image below
    CFrame.lookAt(_pos,         _target.Character:GetPivot().Position)
)

and this is the result:


and if you cant tell the head is supposed to be facing up

Thanks for all help! (I am not too good with CFrames if you can’t tell :sweat_smile:)
If any more context is needed, please reply.

Ok, I fixed it but it may not be the best solution:
I noticed that my model was upright at 90,0,0 so here is what I did:

script.Parent:PivotTo(
    CFrame.lookAt(_pos, _target.Character:GetPivot().Position) * CFrame.Angles(math.rad(90), 0, 0)
)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.