-- shut the front door
-- create door welds if we don't have them yet


weld1 = doorPart1:FindFirstChild("DoorWeld")
weld2 = doorPart2:FindFirstChild("DoorWeld")
if not weld1 or not weld2 then
	if weld1 then weld1:Remove() end
	if weld2 then weld2:Remove() end

	newDoorWeld = Instance.new("ManualWeld")
	newDoorWeld.Part0 = doorPart1
	newDoorWeld.Part1 = outerEdge
	newDoorWeld.C1 = weld1RelativePosition
	newDoorWeld.Name = "DoorWeld"
	newDoorWeld.Parent = doorPart1

	newDoorWeld = Instance.new("ManualWeld")
	newDoorWeld.Part0 = doorPart2
	newDoorWeld.Part1 = outerEdge
	newDoorWeld.C1 = weld2RelativePosition
	newDoorWeld.Name = "DoorWeld"
	newDoorWeld.Parent = doorPart2
else
	weld1.C1 = weld1RelativePosition
	weld2.C1 = weld2RelativePosition
end
isOpen = false

doorTouch1.Touched:connect(touchEvent)
doorTouch2.Touched:connect(touchEvent)

print("REACHED END")
