I have tried to make a basic script that when you touch it, it turns the brick to a random color, makes it half transparent, then in 2 seconds close and change to a random color again.
local Door = script.Parent
function onTouch()
Door.CanCollide = false
Door.Transparency = 0.5
Door.BrickColor = BrickColor:Random()
wait(2)
Door.CanCollide = true
Door.Transparency = 0
Door.BrickColor = BrickColor:Random()
end
Door.Touched:connect(OnTouch)

4 comments
I tried it, it says this in the console when I touch it 12:26:06.284 - attempt to call a nil value 12:26:06.285 - Disconnected event because of exception
Both Perci1 and BosswalrusTheCoder's answers are problems which would stop this script from working; apply both fixes
Didn't see that. Edited it now, thanks boss.
Gave both you and Boss an answered, thanks for the help :)