Roblox UtilitiesDevlHub Roblox Documentation

Class

BasePlayerGui

NotCreatable
Inherits
Instance › Object
Memory category
Instances
Subclasses
3

BasePlayerGui is an abstract class which the GUI drawing storage classes inherit from.

BasePlayerGui is an abstract class that all GUI drawing storage classes inherit from.

Methods 1#

GetGuiObjectsAtPositionReturns a list of all GuiObject instances occupying the given

GetGuiObjectsAtPosition(x: int, y: int): Instances#

Takes a screen position and returns a list of all the GuiObject instances which are occupying that screen position, sorted in the order they appear on screen from top to bottom as the first and last index, respectively. The main use case is to get GUI objects under the player's mouse or touch inputs to allow for selection or highlighting.

Since the child classes of BasePlayerGui inherit this function, it can be fired by container classes such as PlayerGui and StarterGui.

NameTypeDefaultDescription
xintThe X position on the screen relative to the top-left corner after the GUI inset is applied (see GuiService:GetGuiInset()).
yintThe Y position on the screen relative to the top-left corner after the GUI inset is applied (see GuiService:GetGuiInset()).
Returns
  • Instances — A table of the GuiObject instances that occupy the given screen space.

Inherited members#

Inherited from Instance 58
Inherited from Object 6
Properties (2)

ClassName, className

Events (1)

Changed

Subclasses 3#