Orientation property is Global now?

So I was making a sword slash that spins a part in the Y axis, but then it started spining in the global Y axis and then I realised that the entire Orientation property has turned into global orientation instead of local orientation, except for the Z axis for some reason, take a look

is this how it allways was? I think the reasont CFrame visibily update has something to do with this?

1 Like

Hi, the CFrame visibility update only changes the UI in the properties, but not the underlying data.

Rotations are expressed either in local or global space depending on which properties they are. E.g. for the Part.CFrame, they are global, whereas for Attachment.CFrame they are local.

Rotations follow by convention the YXZ order, meaning they rotate first about (global) Y, then (local) X, then (local) Z. You can check this by first rotating a part along Y. Only the Y component will change. If you then rotate about local X, only the X component will change. If you rotate about local Y again, you’ll see also the other components change since local Y is not aligned anymore with global Y.

I hope that helps, let me know if I can help with something else!

1 Like

so if I wanted to spin a part in a local Y, how should I go about it? especially with tweens?

I’m not familiar with tweens, but to rotate locally it’s enough to multiply a CFrame with your local rotation.
This post goes into more detail with some examples:

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.