CoreGuiUtils
Utility functions to work with the CoreGui
Functions
promiseRetrySetCore
CoreGuiUtils.promiseRetrySetCore(tries: number,initialWaitTime: number,...: any--
parameters to set core with
) → Promise<()>Retries setting the core. This is required because sometimes the Core scripts are not initialized by the time that client code executes.
promiseRetryGetCore
CoreGuiUtils.promiseRetryGetCore(tries: number,initialWaitTime: number,coreName: string--
Name of the core to get
) → Promise<any>Retries getting the core. Like CoreGuiUtils.promiseRetrySetCore, this is required because the Core scripts are not necessarily initialized by the time that client code executes.
tryToSetCore
CoreGuiUtils.tryToSetCore(...: any--
Args to try to call SetCore with
) → (boolean,--
false if failed
string?--
Error, if there was one
)Tries to invoke StarterGui:SetCore with the arguments specified
tryToGetCore
CoreGuiUtils.tryToGetCore(coreName: string--
Name of the core to get
) → (boolean,--
false if failed
any--
The retrieved core, or the error if there was one
)Tries to invoke StarterGui:GetCore with the core name specified