function onTouched() wait(.1) script.Parent.Transparency = 0.1 wait(.1) script.Parent.Transparency = 0.2 wait(.1) script.Parent.Transparency = 0.3 wait(.1) script.Parent.Transparency = 0.4 wait(.1) script.Parent.Transparency = 0.5 wait(.1) script.Parent.Transparency = 0.6 wait(.1) script.Parent.Transparency = 0.7 wait(.1) script.Parent.Transparency = 0.8 wait(.1) script.Parent.Transparency = 0.9 wait(.1) script.Parent.Transparency = 1 script.Parent.CanCollide = false wait(3) script.Parent.Transparency = 0 script.Parent.CanCollide = true end script.Parent.Touched:connect(onTouched)? Show less second script local light = script.Parent.PointLight while true do light.Enabled = false wait (math.random(0.1,1)) light.Enabled = true wait (math.random (0.1,1)) end
I would do this:
visible = false local part = script.Parent part.Touched:connect(function() if visible == false then visible = true script.Parent.Transparency = 0.6 for i = 0.6,1,0.02 do script.Parent.Transparency = i wait(0.01) end visible = false script.Parent.Transparency = 1 end end)