H = game.Workspace.Part function OnTouch(Part) wait(2) H.Transparency = 1 wait(2) H.Transparency = 0 end
H = game.Workspace.Part function onTouch(thing)--Thing is the thing that touched this part wait(2) H.Transparency = 1 wait(2) H.Transparency = 0 -- Changing the transparency of H, which is the part in workspace. end script.Parent.Touched:connect(onTouch)--The most important part, the closing of the function. This calls the function when the script's parent is touched. Make sure that this script is inside of the object you want to be touched.
game.Workspace.Part function OnTouch(Part) wait(2) game.Workspace.Part.Transparency = 1 wait(2) game.Workspace.Part.Transparency = 0 end