local W=script.Parent.ClickDetector function onMouseClick()if script.Parent.CanCollide==false then print("\067\108\111\115\101 \100\111\111\114")script.Parent.CanCollide=true script.Parent.Transparency=0 else print("\079\112\101\110 \100\111\111\114")script.Parent.CanCollide=false script.Parent.Transparency=1 end end W.MouseClick:connect(onMouseClick)
--Simple function to make the door appear and disappear

local clickDetector = script.Parent.ClickDetector

function onMouseClick()
	if script.Parent.CanCollide == false then
		print("Close door")
		script.Parent.CanCollide = true
		script.Parent.Transparency = 0
	else
		print("Open door")
		script.Parent.CanCollide = false
		script.Parent.Transparency = 1
	end
end

clickDetector.MouseClick:connect(onMouseClick)
