local brick = Workspace.InvisibleBrick brick.Touched:connect(ontouch) function onTouch(Part) brick.Transparency = 1 wait(1) brick.Transparency = 0 end
You should really test this on your own and use the Output window in Studio to catch any bugs.
In this case, there are two:
When you try to connect that function, 'ontouch' is not defined, since you define the function as 'onTouch'. However, at that point in the script, 'onTouch' isn't defined either.
To fix this, move the connection line to below the function definition.
local brick = Workspace.InvisibleBrick function onTouch(Part) brick.Transparency = 1 wait(1) brick.Transparency = 0 end brick.Touched:connect(onTouch)
In case you didn't already know, you don't have to name functions anything specific for them to work for certain events. A better name for this function would be "flickerPart" as that describes what it does.
Also, you may have seen connection lines above the body of the functions that connect to, but if you look closely, those functions are never explicitly defined to a variable. These functions are called Anonymous Functions.
On your connection line you forgot to capitalize the "T" in "onTouch"
local brick = Workspace.InvisibleBrick brick.Touched:connect(onTouch) <-----HERE function onTouch(Part) brick.Transparency = 1 wait(1) brick.Transparency = 0 end