Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to fix this?[Closed]

Asked by 8 years ago
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):

1 answer

Log in to vote
0
Answered by 8 years ago

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
0
i want it to go from 1 to 0 so that is why i used the minus step electostriking 20 — 8y
0
and also how can you use render step for a Gui? electostriking 20 — 8y
Ad

Answer this question