AlignOrientation in OneAttachment Mode

So, i’m trying to use the AlignOrientation constraint in OneAttachment mode to make a part only change its orientation in the Y-Axis.

This is the code I am currently using:

AlignOrientation.CFrame = CFrame.fromEulerAnglesXYZ(0,math.rad(Part.Orientation.Y),0)

However, for some reason this just makes the block spin, and the information I have found so far on how AlignOrientation actually works in OneAttachment mode is really lacking…could someone please explain how it (AlignOrientation) actually works and how I would go about doing this…

if you use alignorientation with OneAttachment mode

when you change the CFrame alignorientation does not update
im not sure if this is a bug with roblox but it feels like a bug to me

so there is 2 ways to fix this problem

fix 1)

dont use OneAttachment mode

fix 2)

AlignOrientation.Enabled = false
AlignOrientation.CFrame = CFrame.fromEulerAnglesXYZ(0,math.rad(Part.Orientation.Y),0)
AlignOrientation.Enabled = true

also if you dont use OneAttachment mode you can still make it align in 1 axis by using
https://developer.roblox.com/en-us/api-reference/property/AlignOrientation/PrimaryAxisOnly

1 Like

Hiii. Been having the same issue! I just tried out your second fix for OneAttachment mode and I’m amazed that it works. It’s so ugly haha.

I stopped working roughly 5 days ago, before then AlignOrientation in OneAttachment mode worked fine, came back to find it was broken. Definitely a bug because I didn’t change anything in those 5 days. Even resorted to using good ol’ BodyGyro for a little bit.

I also think (and this is hard to prove) that AlignPosition has become choppier in its movements since the last 5 days. Trying to find a solution to that.

IV had this problem since one attachment mode was added from the very beginning

I just have a invisible part and align to the invisible part

Hmm, having an invisible part to align it with seems to be the best solution, not exactly a very elegant one tho :confused: