when i click the button it doesn't show error but it doesn't put the part into transparency = 0 here is the prefix tool > gui > guibutton > localscript and Union(parts that i was asking to set the transparency when clicked) script: button = script.Parent image = script.Parent.Union visible = false
button.MouseButton1Down:connect(function() if visible == false then image.Transparency = 1 visible = true
else image.Transparency = 0 visible = false end end)

6 comments
What do you mean? You need to improve your grammars. Say more in your description, I think..?
I think you can't change the transparency of an union with a script, but I am not shure.
Visible is an attribute of an object. In order to change it you'll do something like this: Frame.Button.Visible = true to make a button visible. In this case, you'll also need to make the frame visible since it's the parent of the Button. So: Frame.Visible = true
When you point to an object (such as image.Transparency) you are accessing the Transparency attribute of the image object. This is no different than clicking on the object in the Explorer window and changing its transparency attribute manually (only difference is you're doing it through a script)
sorry this was a wrong script here is the real one:
button = script.Parent image = script.Parent.Union visible = false button.MouseButton1Down:connect(function() if visible == false then image.Transparency = 1 visible = true else image.Transparency = 0 visible = false end end)