Gui Objects Parented from a Script Never Render

When a gui object is parented to a script, but then parented to another object during run time, it will not render
image something like this image

It should look like this:

Yet at run time you can see in the explorer that the gui had the parent set correctly, but it doesn’t render:

How often does the bug happen (Everytime/sometimes/rarely)? What are the steps that reproduce the bug? Please list them in very high detail. Provide simple example places that exhibit the bug and provide description of what you believe should be the behavior.

I’ve tested it ~15-20 times and it happened every time except for one test where I removed the wait(5) at the beginning of the local script.

Where does the bug happen (www, gametest, etc) Is it level-specific? Is it game specific? Please post a link to the place that exhibits the issue.
Happens in studio and client on an empty baseplate

repro:
guiBug.rbxl (15.0 KB)

When did the bug start happening? If we can tie it to a specific release that helps us figure out what we broke.
I just noticed it today.

4 Likes

We are investigating this issue, thanks for the report!

2 Likes

This seems more like an issue with ZIndex? Both frames have a ZIndex of 0, therefore it’s just chance whether one will render above the other. If you set the frame you are adding to a ZIndex > 0 then it will render as expected.

you can try the repro yourself, it doesn’t render and even if it was a zindex problem you’d see it poking out from the bottom right

I tried it myself and it works fine when I set the ZIndex of the GUI in the script to higher than 0 I can see it after 5 seconds.

(Although you are right it sometimes doesn’t work even with this, however if you set the ZIndex of the existing GUI to something more than 0 and then the one in the script to more than that of the existing GUI it seems to work)

An update on this: I have a fix in the pipeline, there shouldn’t be any additional work on your end to have this work in the future.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.