Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

CFrame LookAt without looking up?

Asked by
Laxely 3
7 years ago

Hello, I want to make a part look at another part but not change the cframe.y value when rotating. I already know how to make a part look at another part but I want it so if the part is above it the part won't look up at it.

Any sort of help is appreciated, thanks.

0
so basically the part can look left and right but not up or down. right? JasonTheOwner 391 — 7y

1 answer

Log in to vote
0
Answered by
Azarth 3141 Moderation Voter Community Moderator
7 years ago
Edited 7 years ago
yourpart.CFrame = CFrame.new(yourpart.Position, Vector3.new(lookingAt.CFrame.x,yourpart.CFrame.y, lookingAt.CFrame.z))
Ad

Answer this question