ScreenGui's GuiFrame's AbsoluteSizes are incorrect until the viewport gets updated (If placed in replicated storage)

If you check the absolutesize of a frame in a screengui that is parented to somewhere outside of StarterGui, it seems to spit out an invalid number (800, 600) instead of the actual viewport size.
This is troublesome because you need to find a hacky way to force an invalidate on the screengui to make sure the value become correct.

This is just an acknowledgment announcement!

We’ve filed a ticket to our internal database, and we’ll follow up when we have an update!

Thanks for the report!

Hi @aaron_mccoy - what is your use case for querying AbsoluteSize within replicated storage?

Sometimes on initialization I need to know the absolutesize/absoluteposition of guiobjects so that I can adjust certain elements. For example, I’ve got a UI system that tries to fit as many smaller UI elements as possible based on its size, and it can’t do its job if the absolutesize is incorrect.

my code structure is like so btw:

  • I have all my screengui in replicatedstorage
  • I have 1 module per screengui that has code specific to updating/initialization that gui
  • On Initializing the client, it will initialize every module, some code might be called here
  • Then it will parent every screengui to playergui and then run some different code.

I’m presuming the issue is that it’s not updating the guiobjects in replicatedstorage since its not being rendered, which is fair, however, even if I parent it to playergui, the AbsoluteSize is still wrong until the viewport size gets updated.

as seen here

Thank you for providing more information @aaron_mccoy - I would think parenting to PlayerGui would provide the correct sizing info, let me share this with the team and see what they think!