Log in to vote

Keeping Hinge Joints Connected?

Asked by 7 years ago

A turret I've made uses a BodyGyro to aim its barrel at players, and then shoots a bullet towards the barrel's lookVector. This method would work great if the hinge joints that allow the gun to rotate freely didn't break apart every other time a server is started. Is there a way to keep this from happening?

1 answer

Log in to vote
Answered by 7 years ago

I don't think use a hinge is possible with what your doing, it might idk. But I would use a Motor hinde and set the Y C0 to the direction:

Hinge ="Motor")
Hinge.Part0 = Base
Hinge.Part1 = Barrel
Hinge.C0 = Base.CFrame:inverse()
Hinge.C1 = Barrel.CFrame:inverse()

That should keep it connect as long as you don't CFrame it.

You can either turn it by using the DesiredAngle or C0-C1 properties. To look at all the properties and how to set them look at the wiki:

It might be a bit confusing.

No, the hinge works fine. it functions reliably in Solo and Online (when it doesn't fall apart). the only problem is that the model falls apart more often that it holds together despite having manually added welded surfaces and hinge surfaces where needed. deaththerapy 60 — 7y

Answer this question