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

Use Camera CFrame angles only?

I am currently working on a gun script and I'm having some issues with construction of arm movement. I want the arms to stay with the body but rotate with the camera instead of the head. Is there any use to use camera.CoordinateFrame but instead of getting the entire CFrame you only get the angles of the camera? Sorry I did not show any code, the question is simple and a code example is not really necessary or it would just over complicate the whole thing, if this is an issue I'll show you what I have.

Thanks for the help! Contact me if you have any questions!

1 answer

✓ Accepted answer

The easiest method is to just subtract out the Position component:

cf = workspace.CurrentCamera.CoordinateFrame
RotOnly = cf - cf.p

I don't understand exactly what effect you're aiming for, so I can't give you any advice more specific than that.

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