this is what i got
function onTouched() wait(.1) for i = 0,1,0.1 do script.Parent.Transparency = (i)
script.Parent.CanCollide = false wait(3) script.Parent.Transparency = 0 script.Parent.CanCollide = true
end end script.Parent.Touched:Connect(onTouched)
It seems you are trying to use a for loop, but you used it incorrectly. in order to slowly fade the transparency of your part.
function onTouched() script.Parent.CanCollide = false for i = 0, 1 ,0.1 do script.Parent.Transparency = i wait(0.1) end wait(3) script.Parent.Transparency = 0 script.Parent.CanCollide = true end script.Parent.Touched:Connect(onTouched)
What this should do is turn off the part's collision after you touch it, and then it will slowly become transparent, increasing transparency by 0.1 every 0.1 seconds. After it becomes fully transparent, it will wait 3 seconds, and then set the part's transparency back to 0 and enables collision.
Let me know if you encounter any problems or if you need any additional help.
It's pretty easy:
function onTouched() script.Parent.CanCollide = false for i = 0, 1, 0.03 do script.Parent.Transparency = i wait(0.03) end wait(3) script.Parent.Transparency = 0 script.Parent.CanCollide = true end script.Parent.Touched:Connect(onTouched)
Like @Hypoxla, it will make it not collide-able, then fade it, wait 3 seconds, make it collide-able, then set transparency to 0.