I have no idea where it goes wrong, but the hinge angle is always a at approx. 45 degrees. I know the problem is not the hinge itself.
local vector_dy = (script.Parent.FakeHinge.Position - target.Position ).magnitude
print(vector_dy, "DY")
local vector_dx = (script.Parent.FakeHinge.Position - Vector3.new(target.Position.X, script.Parent.FakeHinge.Position.Y, target.Position.Z)).magnitude
print(vector_dx, "DX")
local finalx = math.deg(math.atan((vector_dx / vector_dy)))
print(finalx)
--print(finalx)
hinge_2.TargetAngle = -finalx + 35
Hinge.LowerAngle is -35, upperagnle is 25.
help please
