1 | H = game.Workspace.Part |
2 |
3 | function OnTouch(Part) |
4 | wait( 2 ) |
5 | H.Transparency = 1 |
6 | wait( 2 ) |
7 | H.Transparency = 0 |
8 | end |
1 | H = game.Workspace.Part |
2 | function onTouch(thing) --Thing is the thing that touched this part |
3 | wait( 2 ) |
4 | H.Transparency = 1 |
5 | wait( 2 ) |
6 | H.Transparency = 0 -- Changing the transparency of H, which is the part in workspace. |
7 | end |
8 | 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. |
1 | game.Workspace.Part |
2 |
3 | function OnTouch(Part) |
4 | wait( 2 ) |
5 | game.Workspace.Part.Transparency = 1 |
6 | wait( 2 ) |
7 | game.Workspace.Part.Transparency = 0 |
8 | end |