I want to make it so the player faces a part after a Touched event, but when I try Cframe.New, it teleports the player to the specified part and at looks at it at an awkward position. I simply want it so that the player would face in the part’s general direction.
1 Like
use CFrame:lookAt
player.Character:PivotTo(CFrame.lookAt(player.Character.PrimaryPart.Position, part.Position)
It faces the actual part and not the part’s direction
Maybe this would help -
If you want the player to be oriented the same as another part, try this:
part = -- Fill this variable
char = game.Players.LocalPlayer.Character
char:PivotTo(char:GetPivot().Position * part.CFrame.Rotation)
Not sure if this will work because I’m not used to Pivot methods yet-
Just make the torso look at a the target’s position, but at the same Y coordinate.
Torso.CFrame = CFrame.lookAt(Torso.Position, Vector3.new(targetObj.Position.X, Torso.Position.Y, targetObj.Position.Z))
7 Likes
I just changed the cframe inside the parentheses into a vector3 and that worked, thanks!
1 Like
This doesn’t work for me, i have changed it to be
blender.CFrame = CFrame.lookAt(blender.CFrame, Vector3.new(script.Parent.Position.X, blender.Position.Y, script.Parent.Position.Z))
1 Like