Parenting a non-visible ScreenGui into PlayerGui on Client Init and then enabling it later will break all automatic sized GuiObjects

(sorry for long title)
I’ve noticed a very specific bug where parenting + enabling ScreenGuis will not trigger Automatic Sizing updates properly.
Here’s the repro

  1. Have screengui somewhere outside of playergui like replicated storage
  2. have screengui not visible (enabled = false)
  3. have an object with automatic sizing inside of it
  4. have a localscript on startup that will move the screengui to playergui
  5. wait a bit of time (ex: 1 second)
  6. enable that screengui
    Result: Automatic Sized object is broken:

Additional note: This bug will only occur if the re-parenting to the playergui occurs immediately on startup.
If you were to add a task.wait(1) before parenting and enabling the screengui, the bug will no longer occur

Video:

Repro Place (contains 1 screengui and 1 localscript) :: (run as client with F5):
AutomaticSizingBug.rbxl (59.6 KB)

Workaround:
Any code that reparents a screengui to playergui at the start of Client Initialization just needs a task.wait(1) before re-parenting the screenguis and it should be fine

3 Likes

Thanks for the report. We’ll follow up when we have an update for you.

Hi @aaron_mccoy , the issue might have been fixed by one of our previous changes, as we are unable to repro it with the file you provided any more. Please verify on your end and we can close the ticket! Thank you.