Brick = game.Workspace.Brick
function Spleef()
brick.Transparency = 0.1
wait(.1)
brick.Transparency = 0.2 0 wait(.1)
brick.Transparency = 0.3
wait(.1)
brick.Transparency = 0.4
wait(.1)
brick.Transparency = 0.5
wait(.1)
brick.Transparency = 0.6
wait(.1)
brick.Transparency = 0.7
wait(.1)
brick.Transparency = 0.8
wait(.1)
brick.Transparency = 0.9
wait(.1)
brick.Transparency = 1.0
end
Brick.Touched:connect(Spleef)
This should gradually make the part fade, correct? It would go from transparency 0-1 in 1 second when someone touches it. For some reason it doesn't. Does anyone see a problem?
When you set the transparency, make sure brick is "Brick", as you defined it! Capital b. Reference a variable as it's defined. #1 law of variables.
Lots of problems in this script, and you can make it less complex, try this:
brick = game.Workspace.Brick function Spleef() for i = .1, 1, 0.1 do brick.Transparency = i end script.Parent.Touched:connect(Spleef)
Remember to put this inside each Brick