So Basically I have a variable Number that goes up by 1
I HAVE A VARIABLE NUMBER THAT GOES UP BY 1
What I am trying to do is make the ROTATION OF A PART CHANGE ON A SPECIFIC AXIS
ACCORDING TO THE VARIABLE NUMBER
WITHOUT CHANGING THE OTHER AXIS
I want a part to be rotated on one axis only however if you have done rotation you would know that changing one rotation would change the other axis
meaning if I rotated only by Y Axis the rotation of other axes would change
my question is that
HOW WOULD I ROTATE it in one axis while maintaining the same axis
Similar to the world rotation handle (Default) rotation tool in Roblox Studio where it lets you rotate in one axis
I also had to make a new CFrame and rotate it because i wanted to rotate it specifically to the
Number Variable that I had.
heres how the script basically goes for now
local YRotationValueRadians = math.rad(1) local Part = workspace.Part Part.CFrame = CFrame.new(Part.Position) * CFrame.Angles(MaintainXAxis, YRotationValueRadians, MaintainZAxis) -- Basically I want to only change the Y Axis
I can't really explain it more specifically but basically
For example I want a chair to rotate in one axis which is the Y Axis
yet still maintain the other axes such as the X or Z
just times it by the part's CFrame it already doesn't affect the other axis
local Part = workspace.Part for i = 1,100,.1 do Part.CFrame = Part.CFrame * CFrame.Angles(0, math.rad(i/i), 0) task.wait() end
rotate on world axis
local Part = workspace.Part for i = 1,100,.1 do local rx, ry, rz = Part.CFrame:ToEulerAnglesYXZ() Part.CFrame = CFrame.fromEulerAnglesXYZ(rx,ry + math.rad(i/i),rz) + Part.CFrame.Position task.wait() end