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

why is my tool gui not setting part to transparency?

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

0

What do you mean? You need to improve your grammars. Say more in your description, I think..?

0

I think you can't change the transparency of an union with a script, but I am not shure.

0

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

0

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)

0

sorry this was a wrong script here is the real one:

0

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)

1 answer

✓ Accepted answer

Well, this should help:

The higher the transparency, the more transparent it is.

Transparency 1 = invisible, Transparency 0 = visible

1 comment

0

Thanks!

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