local isOpen = true
function open()
isOpen = true
script.Parent.D3.Transparency = 0
script.Parent.D3.CanCollide = true
script.Parent.D4.Transparency = 0
script.Parent.D4.CanCollide = true
script.Parent.D1.Transparency = 1
script.Parent.D1.CanCollide = true
script.Parent.D2.Transparency = 1
script.Parent.D2.CanCollide = true
end
function closed()
isOpen = false
script.Parent.D3.Transparency = 1
script.Parent.D3.CanCollide = true
script.Parent.D4.Transparency = 1
script.Parent.D4.CanCollide = true
script.Parent.D1.Transparency = 0
script.Parent.D1.CanCollide = true
script.Parent.D2.Transparency = 0
script.Parent.D2.CanCollide = true
end
function onClicked()
if isOpen == true then closed() else open() end
end
I want CanCollide on at all times
D1,D2,D3 and D4 = Door 1, Door 2, Door 3 and Door 4.

2 comments
I want CanCollide on at all times, I have added a button (First D3 & D4 are transparent) and when you click it D1 & D2 go transparent and D3 & D4 go visible. The button goes through both doors and has CanCollide off. But it still does not work?
You might have to do a bit of trial and error. I'm not that expirenced in Lua and scripts, but it's best if you can ask Robloxmannnnnnnn on Roblox.