Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Facing the Player Towards a Part?

Say I have the Player (R15 Rig) and there is a part in front of them or in any place/direction

How could I make the player face towards the part (Not using any BodyGyro) with CFrame or Position/Orientation?

I already have a basic understanding of CFrame, Position etc but I can't seem to figure out how to do this effectively can someone help?

1 answer

Use CFrame CFrame.new(Vector3 position, Vector3 lookAt), which creates a CFrame with a position of position looking at lookAt.

local primaryPart = character.PrimaryPart 
primaryPart.CFrame = CFrame.new(primaryPart.Position, targetPart)

This discussion is preserved as it was. New answers, comments, and votes are closed.