Please explain to me what's wrong with my script, keep in mind I only started scripting 1 week ago! I've placed the script as a child to the click detector, The click detector is a child of the actual door. Also, the "wait(3)" is so that you have to click the door , have it open, then close automatically. Need any more info on what I've done in my game that might have caused this? Discord me at:
ThatOneAviator#0311
function DoorOpen()
game.Workspace.OpeningDoor.Transparency = Transparency.new(0.6)
game.Workspace.OpeningDoor.CanCollide = CanCollide.new("false")
wait(3)
game.Workspace.OpeningDoor.Transparency =Transparency.new(0)
game.Workspace.OpeningDoor.CanCollide = CanCollide.new("true")
end
script.Parent.ClickDetector.MouseClick:connect(DoorOpen)

2 comments
Cancollide isn't a class with a constructor
it is a boolean