So on the right I have a part that’s imitating the left part’s orientation with CFrame. The problem is, it doesn’t do it properly, and it’s causing all sorts of issues with my building script.
while wait() do
script.Parent.CFrame=CFrame.new(script.Parent.Position)*CFrame.fromEulerAnglesXYZ(math.rad(workspace.shah.Orientation.X),math.rad(workspace.shah.Orientation.Y),math.rad(workspace.shah.Orientation.Z))
end
This is all my script is. Yes I have used math.rad(). I don’t know why it don’t work.
Can we get an actual CFrame expert here please. If you spent time to read like the three sentences that I wrote in the original post, you’d know I’m trying to work with converting orientation to CFrame.
To @xZylter, CFrame.Angles is the same as CFrame.fromEulerAnglesXYZ(). It says so on the wiki, and tests prove they’re the same. I just made it shorter to attract more people to the post.
I’ll get back to you on this, but it might be with how Roblox handles orientation, it’s very wacky. The issue’s cause to me seems less as CFrame doing the wrong thing. but instead Roblox’s tools doing weird manipulations to get the results you want.
Atleast on the X axis, I saw studio apply 180 degree rotations on the Z and Y axises when all I was doing was applying rotation to X Axis.
This is bound to renderstep which is why it’s instant, but it will work from the server as well but it’ll be a little delayed. If you’re doing this I suggest a custom wait function as wait() is not great for this because it’s not always accurate