if Distance.X > 1.8 then
Motor6D1.Transform = Motor6D1.Transform
Motor6D2.Transform = Motor6D2.Transform
elseif Distance.X < 0 then
Motor6D1.Transform = Motor6D1.Transform
Motor6D2.Transform = Motor6D2.Transform
else
Motor6D1.Transform = Motor6D1.Transform * CFrame.Angles(0,math.rad(Percent + 270),0)
Motor6D2.Transform = CFrame.Angles(math.rad(Percent + 270)*2,Motor6D2.Transform.Y,Motor6D2.Transform.Z)
end
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!

4 comments
Is there any option to bookmark a post cuz this seems very useful :3. Sry if this isnt an answer
There are some properties in the Motor6D that could probably help you. Here’s a link that’ll tell you about it -> http://wiki.roblox.com/index.php?title=API:Class/Motor6D
Darn, no limits on Motor6Ds! hmm, maybe I can have the limits similar to how I have the max and min distances...
You could use constraints, but they require for your game to have PGPhysicsSolver enabled.