How to make player directly look at a part?

Hello. I am making a game and I need to make the player turn towards a part. However, because my game is R15, I have no idea how to manipulate the Root Joint of the player to look towards a part.

I would do CFrame, but it messes up the players movement.

I have tried a lot, using CFrame.Angles(), using Transform, Using CFrame.lookAt, but nothing works.

Have you tried doing this?

HRP.CFrame = CFrame.new(HRP.Position, Part.Position)
1 Like

I said, I cant do CFrame or else it would mess up the players’ movements.

You can try using a BodyGyro or AlignOrientation for that.

How would that look? β€Ž β€Ž β€Ž β€Ž β€Ž

local bodyGyro = Instance.new("BodyGyro")
bodyGyro.Parent = HRP
bodyGyro.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
bodyGyro.CFrame = CFrame.new(HRP, Part)

Let me know if this works

1 Like

You forgot the HRP.Position, But it works! Thank you so much! But is there anyway to make it look faster?

Yeah, my bad I forgot the position values. To make it look faster, you have to change the BodyGyro.P value. The higher the value, the faster it will move.

1 Like

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