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

Make a gui and its children fade out?

Asked by 8 years ago

Hello, so I was wondering, is their an easy way to make a frame and its children fade out and then get destroyed? Currently I'm thinking I have to use a for loop, and subtract .1 from the background transparency of each object, and if its a textlabel, subtract .1 from the text transparency etc. There has to be a better way, right?

2 answers

Log in to vote
0
Answered by 8 years ago

Use a recursive function to get all objects of a certain type (use IsA("GuiObject")) and put them in a table. Then using a n generic for loop inside a numeric for loop to iterate over the table and set the BackgroundTransparency and TextTransparency (of objects whose name starts with "Text") of the UI elements.

0
Thats exactly how I was gonna do it :P FrostTaco 90 — 8y
Ad
Log in to vote
0
Answered by 8 years ago

That should work fine, I can't think of any other ways atm.

Answer this question