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

CFrame LookAt without looking up?

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.

1 comment

0

so basically the part can look left and right but not up or down. right?

1 answer

✓ Accepted answer
yourpart.CFrame = CFrame.new(yourpart.Position, Vector3.new(lookingAt.CFrame.x,yourpart.CFrame.y, lookingAt.CFrame.z))

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