--handle.ClickDetector.MouseClick:Connect(function(player, part)

	if doorOpen == true and changingState == false then
		changingState = true
		soundo:Play()
		for i = 1, 16 do
			script.Parent:SetPrimaryPartCFrame(script.Parent.PrimaryPart.CFrame * CFrame.new(0, 0, 0.1))
			wait(0.0001)
		end
		script.Parent.Key.ProxPart.ProximityPrompt.Enabled = false
		script.Parent.Key.md.Prompt.Enabled = false
		changingState = false
		doorOpen = false
	elseif changingState == false then
		changingState = true
		soundc:Play()
		for i = 1, 16 do
			script.Parent:SetPrimaryPartCFrame(script.Parent.PrimaryPart.CFrame * CFrame.new(0, 0, -0.1))
			wait(0.0001)

		end
		script.Parent.Key.ProxPart.ProximityPrompt.Enabled = true
		script.Parent.Key.md.Prompt.Enabled = true
		changingState = false
		doorOpen = true
	end
end)
