GuiService:GetGuiInset() returns the inset of user GUIs (i.e. of the topbar). However, GetGuiInset returns 0,0 until the topbar loads. I agree with this behavior, but there’s no way for me to tell whether or not GetGuiInset is returning 0,0 because the inset is actually 0,0 or because the topbar hasn’t loaded yet. I’d like to be able to do something like:
if not GuiService.IsTopbarLoaded then
GuiService:GetPropertyChangedSignal("IsTopbarLoaded"):wait()
end
local insetAfterLoad = GuiService:GetGuiInset()
and for when inset changes more than on topbar load:
while GuiService:GetPropertyChangedSignal("GuiInset"):wait() do
print("Inset changed to", GuiService.GuiInset)
end
Right now I’m having to resort to hacks like:
while not game:FindFirstChild("TopBarContainer", true) do
wait()
end
local insetAfterLoad = GuiService:GetGuiInset()