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.
Everything says true, which means Cancollide is on at all times. (put false to deactivate) I don't know the problem here...
Have you added a button to open these doors? Get a part, add clickdetector, put on the very top of script saying "function onclicked()" Make sure after the "end" of the second door set, it must have a mouseclick thing. Check through free models for that.