PlayerGuiUtils
Helper methods for finding and retrieving the PlayerGui instance
Functions
getPlayerGui
Finds the current player gui for the Players.LocalPlayer property or errors.
WARNING
This method errors if it can't find the PlayerGui. Fortunately, the PlayerGui is pretty much guaranteed to exist in most scenarios.
findPlayerGui
Finds the current player gui for the Players.LocalPlayer property.
observePlayerGui
Observes the current player gui. On a real client this is static -- the engine inserts the
PlayerGui before any client script runs and never replaces it. Headless (no Players.LocalPlayer)
it follows the PlayerMock local-player designation, which a test may make or change after
subscription (see PlayerMock.setMockedLocalPlayer).