I have a script that rotates the top half of a sphere around to the bottom half of it keeping the center the same.
What I am having trouble with is if I rotate the whole model the rotation takes place around the global axis, not the local axis like I would like it to.
I have tried playing around with COS and SIN using the parts Orientation in the CFrame.Angles but no combination I tried worked. I later read that using EularAngles only works with global axis. Is there a way to translate this to the local axis using a lookVector or part Orientation or some other function?
TopPart = game.Workspace.TopPart Center = game.Workspace.Center Tpos = TopPart.Position Cpos = Center.Position for i=1,180 do TopPart.CFrame = CFrame.new(Center) * CFrame.Angles(-math.rad(i),0,0) * CFrame.new(0,Tpos.Y - Cpos.Y,0) wait(0.005) end