My script doesn't seem to work properly.
brick = script.Parent.brick
c = true
function OnC()
if c == true then
c = false
brick.CFrame = CFrame.new(-39.2, 4.69, -53.3)
else
brick.CFrame = CFrame.new(-39.2, 4.69, -46.8)
c = false
end
end
brick.ClickDetector.MouseClick:connect(OnC)
When I click my door, it rotates 90 degrees. When I click it again, it goes back. When I attempt to click one last time, it does not do anything. The script breaks after that.

2 comments
What exactly does "b = 0" mean?
Variable should work.