I want to make a part that is also the players character (does not have humanoid, its just a custom character) look towards the center of the screen exactly like when you enable Shift Lock Screen Switch.
That means that the character will not look up, it will only rotate on the Y axis.
Thanks!
1 Like
You can make the part look from Part.Position
to Part.Position + the camera's lookvector without its Y component
Part.CFrame = CFrame.lookAt(Part.Position, Part.Position + (Camera.CFrame.LookVector * Vector3.new(1, 0, 1)).Unit)
3 Likes
Iām not asking you to write an entire script for me? I just wanted to know how I would make it only rotate on the Y axis and face the mouse position.
1 Like
It works. Thanks for helping me.