How can I make the player face a part?

I am trying to make a script that allows you to pick up items on the floor. I have an animation attached to this, and I want the player to be facing the part, then playing the animation.

			player.Character.HumanoidRootPart.CFrame = CFrame.lookAt(player.Character.HumanoidRootPart.Position, script.Parent.Parent.Parent.Handle.Position)

I tried doing this, and this does work, however it sometimes flips my character over. If it doesnt, then it feels rugged when snapping to the part.

Is there a better way to do this, like only changing the players rotation to face the part? Thanks

make sure camera are scripteble


game.workspace.cureentcamera.CFrame = CFrame.New(game.workspace.cureentcamera.CFrame * CFrame.LookAt(Character.Head.Position  , part.Position ))
1 Like

don’t use Y or part position:

player.Character.HumanoidRootPart.CFrame = CFrame.new(player.Character.HumanoidRootPart.Position, Vector3.new(script.Parent.Parent.Parent.Handle.Position.X, player.Character.HumanoidRootPart.Position.Y, script.Parent.Parent.Parent.Handle.Position.Z))