Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to fix this?[Closed]

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

✓ Accepted answer

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

2 comments

0

i want it to go from 1 to 0 so that is why i used the minus step

0

and also how can you use render step for a Gui?

This discussion is preserved as it was. New answers, comments, and votes are closed.