H = game.Workspace.Part
function OnTouch(Part)
wait(2)
H.Transparency = 1
wait(2)
H.Transparency = 0
end
- I'm a newbie, I'm trying to experiment with functions.
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
All you did was take out H = ._.
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Thank you DeathBear :D