script.Parent.ClickDetector.MouseClick:connect(function()
local obj = script.Parent
local transpar = obj.Transparency
local anchr = obj.Anchored
local cancoll = obj.CanCollide
transpar = 0.1
wait(0.1)
transpar = 0.2
wait(0.1)
transpar = 0.3
wait(0.1)
transpar = 0.4
wait(0.1)
transpar = 0.5
wait(0.1)
transpar = 0.6
wait(0.1)
transpar = 0.7
wait(0.1)
transpar = 0.8
wait(0.1)
transpar = 0.9
wait(0.1)
transpar = 1
end)
I am attempting to make a block's transparency change over time on click. This isn't working for some reason and I am confused as to the reason why. I suspect that it is something with my function setup, but I am not sure. Please explain your answer, thank you.

3 comments
The variable for the other object properties are for other things I'm going to be doing in the script.
Thank you, this helped my problem.
Excellent use of for loops. Bravo, yoshi!