Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to make a SelectionBox appear on an object?

I have tried using command line and manually getting a selection box from other objects and parenting them under an object but it still won't appear. Why?

Do I need to insert it locally?

1 answer

✓ Accepted answer

First of, yes it must be a LocalScript in some part of the player.

Selection Boxes use a special property called Adornee. It attaches the box to the value.

Here is a simple script that should work, it just creates a SelectionBox and a Part, and makes the box appear on the part:

-- Inside LocalScript

local prt = Instance.new("Part", workspace)
local box = Instance.new("SelectionBox", prt)
box.Adornee = prt

read more about Selection Boxes here and here

This discussion is preserved as it was. New answers, comments, and votes are closed.