local brick = Workspace.Brick; -- Store a reference to the brick.
local brick2 = Workspace.Brick2;--Add this to see difference
function onTouch(part) --This is called a parameter. For touched, its just whatever is touched. SO, you could do this
part.Transparency = 1
wait(1)
part.Transparency = 0
end --It would change the part that was touched.
--The wiki only changes brick.
brick.Touched:connect(onTouch) -- The line that connects the function to the event.
--Siince it only connects to brick, you cant really see change, but if you did this
brick2.Touched:connect(onTouch);--Connect touching. |