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

Rotate Character to Object?

I'm trying to make a camera system, Its follows the same principle as the camera system from the legend of Zelda series. When you target an object, ie sign, NPC, Enemy the camera locks on them and the player can only walk around them. I have all that done. What I need help with is when the player runs around them they are running sideways. This is do to Humanoid.AutoRotate set to true. If the player runs left their character faces left, if they go right their character faces right. If I set Auto-Rotate to false then their character spins in circles because there is nothing making the character turn as they walk.

How would you make a player face an object? if you could just point me in the right direction that would be perfect.

In the code I have a loop for the camera to face the object I just don't know how to face the player.

1 answer

you can use CFrame.new(pos1,pos2) to get a cframe at pos1, facing pos2, hope this helps

1 comment

0

Could you explain this a bit more?

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