Hello there! Im making a tool that rotates using key presses.
But I want to make it exactly like in studio.
I made this script:
if parent and yRing and xRing and zRing then
if currentRotateMode == 'X' then
xPressed +=1
if xPressed>= Spacing then
xPressed = 0
end
Rotate += (Vector3.new(0,360,0)- xRing.Orientation)/(Spacing-xPressed-1)
elseif currentRotateMode =='Y' then
yPressed+=1
if yPressed>= Spacing then
yPressed = 0
end
Rotate +=(Vector3.new(0,360,0)- yRing.Orientation)/(Spacing-yPressed-1)
elseif currentRotateMode == 'Z' then
zPressed+=1
if zPressed>= Spacing then
zPressed = 0
end
Rotate += (Vector3.new(0,360,0)- zRing.Orientation)/(Spacing-zPressed-1)
end
end
but it works very bad. Steps that script printed were weird(this is the orientation that adds to current):
0, 12.272727012634277, 0
0, 12.272857666015625, 0
0, 12.272500038146973, 0
0, 12.272631645202637, 0
0, 12.272777557373047, 0
0, 12.272941589355469, 0
0, 12.272500038146973, 0
0, 12.272665977478027, 0
0, 37.987144470214844, 0
0, 37.98692321777344, 0
Do you know how to add only one value using only real-time orientation?