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

Rotate to angle of camera? [closed]

Asked by 10 years ago

I don't understand the camera very much, so how would I make a part rotate to match the angle of the camera? (On the Y axis, so if you look up, the part angles upwards. Look down, and the part turns downward.)

What the point in this?

I made this gun, the camera is set to LockedFirstPerson, and I'd like for the players arms to move up and down with the camera. I'm not sure how to do this. I think it may have something to do with CoordinateFrame, but as I said, I know almost nothing about how the Camera works.

Locked by TheMyrco

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

1 answer

Log in to vote
3
Answered by
TheMyrco 375 Moderation Voter
10 years ago

Consider local rotation = workspace.CurrentCamera.CoordinateFrame:toEulerAnglesXYZ().

Ad