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

How do I make a button's parent (a frame) invisible?

Asked by 3 years ago

I am making a car and I want to note the transmission modes. But having it there while driving can get pretty annoying therefore I want to make it so when I press a button, the parent becomes invisible. The button has transparency set to 1 and is in the same frame as the text, by the way. I am a newbie scripter, and I've tried some scripts but haven't found a solution to my problem. Any help is appreciated.

2 answers

Log in to vote
0
Answered by 3 years ago

Making Frame Invisible

To make the Frame invisible, you can check the Visible to false. You can do it by using a Script.

Script:

script.Parent.MouseButton1Click:Connect(function() --Detect if button clicked

script.Parent.Parent.Visible = false --Change the frame visible to false

end)

Comment if you find any problem.

Hope It Help!

Ad
Log in to vote
0
Answered by 3 years ago

Just set the frame's background transparency to 1

Answer this question