Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

why is my tool gui not setting part to transparency?

Asked by
lo_1003 42
4 years ago

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)

0
What do you mean? You need to improve your grammars. Say more in your description, I think..? Xapelize 2658 — 4y
0
I think you can't change the transparency of an union with a script, but I am not shure. Disnejar 2 — 4y
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 SteelMettle1 394 — 4y
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) SteelMettle1 394 — 4y
View all comments (2 more)
0
sorry this was a wrong script here is the real one: lo_1003 42 — 4y
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) lo_1003 42 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

Well, this should help:

The higher the transparency, the more transparent it is.

Transparency 1 = invisible, Transparency 0 = visible

0
Thanks! lo_1003 42 — 4y
Ad

Answer this question