Having rotation limits on Motor6Ds?
01 | if Distance.X > 1.8 then |
02 | Motor 6 D 1. Transform = Motor 6 D 1. Transform |
03 | Motor 6 D 2. Transform = Motor 6 D 2. Transform |
05 | elseif Distance.X < 0 then |
06 | Motor 6 D 1. Transform = Motor 6 D 1. Transform |
07 | Motor 6 D 2. Transform = Motor 6 D 2. Transform |
09 | Motor 6 D 1. Transform = Motor 6 D 1. Transform * CFrame.Angles( 0 ,math.rad(Percent + 270 ), 0 ) |
10 | Motor 6 D 2. Transform = CFrame.Angles(math.rad(Percent + 270 )* 2 ,Motor 6 D 2. Transform.Y,Motor 6 D 2. Transform.Z) |
Ok, this script basically coverts a part
's position
into Motor6D
Rotation in two CFrames
. This bit of code does not show some of the variables, but they are self-explanitory. I need a way to have limits, so it cant rotate
past a certain point. How could I do this? Any help will be greatly appreciated!