Hinge Constraint Script breaking

Hello! I’m making a catapult, but every time I try editing, instead of the catapult facing up, it goes down. I’ve tried changing the speed, torque, and angle variables. Here is my code:

local hinge1 = script.Parent.LeftHinge.HingeConstraint
local hinge2 = script.Parent.RightHinge.HingeConstraint
local speed = 100
local targetangle = 90
local torque = 100
script.Parent.Button.ClickDetector.MouseClick:Connect(function()
	hinge1.TargetAngle = targetangle
	hinge2.TargetAngle = targetangle
	hinge1.ServoMaxTorque = torque
	hinge2.ServoMaxTorque = torque
	hinge1.AngularSpeed = speed
	hinge2.AngularSpeed = speed
	task.wait(2)
	hinge1.TargetAngle = 0
	hinge2.TargetAngle = 0
	hinge1.AngularSpeed = 2
	hinge2.AngularSpeed = 2
	task.wait(1)
	hinge1.AngularSpeed = 0
	hinge2.AngularSpeed = 0
	hinge1.ServoMaxTorque = 0
	hinge2.ServoMaxTorque = 0
end)

I would greatly appreciate it if you helped. Thanks.

You only need 1 HIngeConstraint, not 2.
Make sure your Attachments for the base and catapult arm are at the same Position.
Make sure your Attachments for the base and catapult arm are Oriented the same way (the yellow and orange arrows for the base Attachment should align with the arm Attachment.

If you have the HingeConstraint set to Servo then you don’t need to keep changing the ServoMaxTorque. You only need to script the TargetAngle to change. If you want the arm to move quickly when releasing the catapult I’d suggest more than 2, and for it to ‘load’ the arm backwards use a much slower speed.
Also try increasing your ServoMaxTorque to a very large value to be able to move the arm quickly, but you can leave it at that large amount and it will move back slowly as well.