I'm new to scripting and I'm experimenting with this new thing I learned but it won't work. The script is below. Please fix it and explain what I did wrong. The point of this script is to slowly make the brick transparency until it disappears and then remove it.
function touch
script.Parent.Transparency = 0.2
wait(0.5)
script.Parent.Transparency = 0.5
wait(0.5)
script.Parent.Transparency = 0.7
wait(0.5)
script.Parent.Transparency = 1
wait(0.5)
script.Parent:remove()
end
script.Parent.Touched:connect(touch)
end
Thank-you.

5 comments
In the future, please provide your error, although in this situation the problems are pretty obvious.
What is my error?
All you said is that I made a mistake, not what my mistake is. That comment is useless.
He told me in the chat to answer because he was too lazy. .-.
How do I talk on the chat? o.o