In the output I keep getting Workspace.Part.SurfaceGui.TextButton.Script:12: 'end' expected (to close 'for' at line 3) near 'for'
b = script.Parent b.MouseButton1Click:connect(function() for n = 0,1,0.1 do wait(0.1) b.BackgroundTransparency =n b.TextTransparency = n break -- if b.BackgroundTransparency ==0 -- and b.TextTransparency ==0 -- then --wait(5) for i = 1,0,-0.1 do wait(0.1) b.BackgroundTransparency =i b.TextTransparency = i break end end end)
if the sytsem tells u close it, then close it... that's the thing I'd actually recommend most, Listen to the Output
b = script.Parent b.MouseButton1Click:connect(function() for n = 0,1,0.1 do wait(0.1) b.BackgroundTransparency =n b.TextTransparency = n break -- if b.BackgroundTransparency ==0 -- and b.TextTransparency ==0 -- then --wait(5) end --closes 'for' above, loops need an end just like functions and if's for i = 1,0,-0.1 do wait(0.1) b.BackgroundTransparency =i b.TextTransparency = i break end end end)
Workspace.Part.SurfaceGui.TextButton.Script:12: 'end' expected (to close 'for' at line 3) near 'for' In other words you forgot an end it happens to me a lot.
for i= 1,1,0.1 do -- code end