So i've been browsing roblox core gui scripts and found a script with these 2 lines:
local RobloxGui = CoreGui:WaitForChild("RobloxGui")
local Utility = require(RobloxGui.Modules.Settings.Utility)
I was confused, they use :WaitForChild() on the RobloxGui, but do not use it on the Utility variable. How does that work? I've been doing a lot of research and i know that WaitForChild waits for the instance and not it's children so why don't they use it on the utility module? Does it have to do something with the point that is it core script or modules replicate like that?
Thanks in advance, kirda

2 comments
I think i get you but could you please explain it a little bit more? From what i got, the script waits for the core gui for the module to load? Is this what you mean? Thanks
The script first waits for the RobloxGui, inside of the CoreGui. Then, it defines the variable 'Utility' as the module. Be aware this script DOESN'T wait for the module. If it's not there, it would simply return an error.