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)

1 comment
Also, if u ever need to kno ho to put a function under another function, then u'll find the Anser in the 'end's