[quote] But here you are rotating using the part’s current cframe angles.
My goal was to have it where the part’s existing cframe angle orientation would have no effect on the rotation it will undergo.
--- this orientation
part.CFrame = CFrame.Angles(math.rad(90),0,0)
--- interpolate to
part.CFrame = CFrame.Angles(math.rad(90),0,math.rad(20))
Here you could see that both angle rotations were constructed without using the part’s cframe, which is important in particular when I have animation sequences that should cancel each other out. Yet, the part can still rotate on the same axis.
The current way you have:
part.CFrame = part.CFrame * CFrame.new(0, 0, 0, xs[2], ys[2], zs[2], math.sqrt(xs[1] + ys[1] + zs[2]))
--- to
part.CFrame = part.CFrame * CFrame.new(0, 0, 0, xs[2], ys[2], zs[2], xs[1])
You would have to set the part to rotate on one axis and then rotate on the other axis?
Because it couldn’t be done without the part already rotated the first way. [/quote]
No the way it works is you set the amount you want to rotate. It has the rotation parent structure of your choice on top then however roblox deals with setting the other coordinates. An example of the other coordinates would be:
-- The rest of the other code.
wait(1)
xs = {changes("x", x)}
ys = {changes("y", y)}
zs = {changes("z", z)}
print(xs[2], ys[2], zs[2])
part.CFrame = CFrame.Angles(xs[2], ys[2], zs[2], ys[1])
wait(1)
xs = {changes("x", x*2)}
ys = {changes("y", math.rad(10))}
zs = {changes("z", 0)}
print(xs[2], ys[2], zs[2])
part.CFrame = CFrame.Angles(xs[2], ys[2], zs[2], xs[1])
Has nothing to do with the parts structure. I just use the * to keep on adjusting the CFrame.