Character rotating issue

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve?
    i want character to rotate to the part when proximityprompt.PromptButtonHoldBegan

  2. What is the issue? Include screenshots / videos if possible!
    robloxapp-20230528-1424464.wmv (567.9 KB)

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    Yes, i searched about it but no result :frowning:

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that itโ€™s easier for people to help you!

		local meshPart = v:FindFirstChildWhichIsA("ProximityPrompt", true):FindFirstAncestorWhichIsA("MeshPart")
		player.Character.Humanoid.AutoRotate = false
		player.Character:PivotTo(CFrame.lookAt(player.Character:GetPivot().Position, meshPart.Position))

Please do not ask people to write entire scripts or design entire systems for you. If you canโ€™t answer the three questions above, you should probably pick a different category.