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

How do I make my Character face the given part?

This line is supposed to make my character face towards FACINGPART..And it's not working.

I'm not too good at CFrame so your help would be appreciated

Player.Character.Torso.CFrame = Player.Character.Torso.CFrame 
* CFrame.Angles((Player.Character.lookVector * FACINGPART.CFrame.p) ,0 , 0)

1 answer

✓ Accepted answer

Not a bad attempt, but it's much easier than you think.

There's a CFrame constructor CFrame.new(Vector3 position, Vector3 lookAt) that creates a CFrame at position, looking at lookAt.

There your code would be as simple as:

player.Character.Torso.CFrame = CFrame.new(player.Character.Torso.Position, FACINGPART.Position)

1 comment

0

Thanks for that.

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