Using Adornment GUIs
Using Adornment GUIs
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.