Script.Parent.Touched:connect(function(otherPart) Script.parent.Part.Transparency = 1 wait(0.1) Script.parent.Part.Transparency = 0.9 wait(0.1) Script.parent.Part.Transparency = 0.8 wait(0.1) Script.parent.Part.Transparency = 0.7 wait(0.1) Script.parent.Part.Transparency = 0.6 wait(0.1) Script.parent.Part.Transparency = 0.5 wait(0.1) Script.parent.Part.Transparency = 0.4 wait(0.1) Script.parent.Part.Transparency = 0.3 wait(0.1) Script.parent.Part.Transparency = 0.2 wait(0.1) Script.parent.Part.Transparency = 0.1 wait(3) Script.parent.Part.Transparency = 0.1 wait(0.1) Script.parent.Part.Transparency = 0.2 wait(0.1) Script.parent.Part.Transparency = 0.3 wait(0.1) Script.parent.Part.Transparency = 0.4 wait(0.1) Script.parent.Part.Transparency = 0.5 wait(0.1) Script.parent.Part.Transparency = 0.6 wait(0.1) Script.parent.Part.Transparency = 0.7 wait(0.1) Script.parent.Part.Transparency = 0.8 wait(0.1) Script.parent.Part.Transparency = 0.9 wait(0.1) Script.parent.Part.Transparency = 1 end)
???
It should be in a While True Do loop so it will look like this:
while true do wait(0.1) Script.parent.Part.Transparency = 1 wait(0.1) Script.parent.Part.Transparency = 0.9 wait(0.1) Script.parent.Part.Transparency = 0.8 wait(0.1) Script.parent.Part.Transparency = 0.7 wait(0.1) Script.parent.Part.Transparency = 0.6 wait(0.1) Script.parent.Part.Transparency = 0.5 wait(0.1) Script.parent.Part.Transparency = 0.4 wait(0.1) Script.parent.Part.Transparency = 0.3 wait(0.1) Script.parent.Part.Transparency = 0.2 wait(0.1) Script.parent.Part.Transparency = 0.1 wait(3) Script.parent.Part.Transparency = 0.1 wait(0.1) Script.parent.Part.Transparency = 0.2 wait(0.1) Script.parent.Part.Transparency = 0.3 wait(0.1) Script.parent.Part.Transparency = 0.4 wait(0.1) Script.parent.Part.Transparency = 0.5 wait(0.1) Script.parent.Part.Transparency = 0.6 wait(0.1) Script.parent.Part.Transparency = 0.7 wait(0.1) Script.parent.Part.Transparency = 0.8 wait(0.1) Script.parent.Part.Transparency = 0.9 wait(0.1) Script.parent.Part.Transparency = 1 end)
This is more efficient and more of what you originally wanted.
script.Parent.Touched:connect(function(otherPart) for i = 1, 0.1 do script.Parent.Part.Transparency = i wait(0.1) end wait(3) for i = 1, 0.1 do script.Parent.Part.Transparency = i wait(0.1) end end)