heres my attemp:
local wall = script.Parent local mouse = game.Player:GetMouse() local click = game.Workspace.wall1.ClickDetector:Touched()
local function closeWall(part) wall.CanCollide = true for transparency = 0, 0, 0 do door.Transparency = transparency wait(.1) end
function openDoorOnClick() if mouse.click.wall then wall.CanCollide = false for transparency = 1, 0, -.1 do door.Transparency = transparency wait(.1) wait(5) closeWall end

2 comments
forgot to add:
local mouse = game.Player:GetMouse()