PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience

Using Adornment GUIs

Using Adornment GUIs

Jun 14 2019, 4:48 PM PST

Problem

You want to use a 3D GUI like SelectionBox.

Solution

Create the GUI and set its Adornee property.

local screen, box = Instance.new('ScreenGui'), Instance.new('SelectionBox')
 
screen.Parent = game.StarterGui
box.Parent = screen
box.Adornee = game.Workspace.Part

Discussion

Make sure that game.Workspace.Part exists. Create the instance (in this case we’re using a SelectionBox). Then we set the Adornee property to the part to adorn the GUI to the part. This will create a SelectionBox on game.Workspace.Part.

Tags:
  • gui