How would i script a brick, so when a player touches it, it fades away?
COMMUNITY QUESTION
Fade on touch?
2 answers
Use the Touched Event: http://wiki.roblox.com/index.php?title=Touched_(Event), a for loop: http://wiki.roblox.com/index.php?title=For_loop#For, and the Transparency property: http://wiki.roblox.com/index.php?title=Transparency.
-- Put this script in the block that will fade
function onTouch(Touched)
if Touched.Parent:findFirstChild("Humanoid") then
for i = 1, 50 do
script.Parent.Transparency=script.Parent.Transparency+0.2
wait(1) -- Adjust "1" to your liking
end
end
end
script.Parent.Touched:connect(onTouch)
This should work! I tested it and it works for me.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
OKay, i'l ltry it.
Did you figure it out?