Collapse Sidebar


Sets the currently selected objects in Roblox Studio to Instances in the given array.

Calling this function will cause the Selection/SelectionChanged event to fire, unless the new selection set is identical to the previous selection.

Note this function overwrites the existing selection. However, using Selection/Get an Instance can be added to the existing selection like so:

local selected = Selection:Get()
table.insert(selected, object)


Name Type Default Description

An array of Instances to set the current selection to.


Return Type Summary

Code Samples

Selection Set

This code sample will select every BasePart in the workspace that is Bright red.