[quote] [quote=â€śVolcanoINCâ€ť post=53177][quote=â€śflatline115â€ť post=53174][quote=â€śVolcanoINCâ€ť post=53173][quote=â€ślitozinnamonâ€ť post=53171]

[/quote]

Thanks!

Now, say I rotated the part 20â”¬â–‘ around the X axis, and now I wanted to continue from there and rotate it around the Z axis. Would I add Vector3.new(0,0,1) to v and keep normalizing, or is it more complicated than that?[/quote]

From the sounds of it you would just subtract 1 from the X value of the vector and at 1 to the Z value of the vector.[/quote]

From the looks of it, that would reverse the rotation I have made along the X axis and rotate it only along the Z axis.[/quote]

Didnâ€™t you want it to rotate around the Z axis after 20 degrees anyways?[/quote]

Yes, but I wanted to keep the rotation Iâ€™ve made around the X axis.[/quote]

Then just multiply the CFrame instead of setting it to that directly ex:

[code]function changes(dir, val)

if dir == â€śxâ€ť then

v = Vector3.new(1,0, 0)

w = math.cos(val/2)

x2 = math.sin(val/2)*v.x

y2 = math.sin(val/2)*v.y

z2 = math.sin(val/2)*v.z

return w, x2

elseif dir == â€śyâ€ť then

v = Vector3.new(0,1, 0)

w = math.cos(val/2)

x2 = math.sin(val/2)*v.x

y2 = math.sin(val/2)*v.y

z2 = math.sin(val/2)*v.z

return w, y2

elseif dir == â€śzâ€ť then

v = Vector3.new(0,0, 1)

w = math.cos(val/2)

x2 = math.sin(val/2)*v.x

y2 = math.sin(val/2)*v.y

z2 = math.sin(val/2)*v.z

return w, z2

end

end

function calc(x, y, z, part)

for i = 1, 100 do

xs = {changes(â€śxâ€ť, x)}

ys = {changes(â€śyâ€ť, y)}

zs = {changes(â€śzâ€ť, z)}

part.CFrame = part.CFrame * CFrame.new(0, 0, 0, xs[2], ys[2], zs[2], math.sqrt(xs[1] + ys[1] + zs[2]))

wait()

end

end

calc(math.rad(5), math.rad(5), math.rad(5), Workspace.Part)

[/code]