Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Having rotation limits on Motor6Ds?

Asked by
Jo_Bot 67
6 years ago
    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 positioninto Motor6DRotation 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 rotatepast a certain point. How could I do this? Any help will be greatly appreciated!

0
Is there any option to bookmark a post cuz this seems very useful :3. Sry if this isnt an answer Konethorix 197 — 6y
0
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 User#20279 0 — 6y
0
Darn, no limits on Motor6Ds! hmm, maybe I can have the limits similar to how I have the max and min distances... Jo_Bot 67 — 6y
0
You could use constraints, but they require for your game to have PGPhysicsSolver enabled. TheRings0fSaturn 28 — 6y

Answer this question