if not script.Parent == nil then for i=1,0,-0.05 do script.Parent.Frame2.BackgroundTransparency=i end end
--it doesn't work(its pretty clear what its meant to do):
Well, the code will not work since you check to see if the OBJ is nil which if it is you can not edit "nil" since it is valued at nothing.
Also, you execute the code 1, 0, -0.05 which will not run the loop.
if not script.Parent ~= nil then for i= 0, 1, 0.1 do script.Parent.Frame2.BackgroundTransparency=i game:GetService("RunService").RenderStepped:wait() -- Feel free to edit the wait() intervals end end