(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
- Have screengui somewhere outside of playergui like replicated storage
- have screengui not visible (enabled = false)
- have an object with automatic sizing inside of it
- have a localscript on startup that will move the screengui to playergui
- wait a bit of time (ex: 1 second)
- 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