Collapse Sidebar


Returns an array of currently selected Instances in Roblox Studio.

If no Instances are selected, the array returned be empty. This function can be used in conjunction with the Selection/SelectionChanged event to get the selection whenever it changes.

Note, this function can only be used in Plugins or the command line.

For changing the current selection, please see Selection/Set.


Return Type Summary

An array of currently selected Instances.

Code Samples


The following code sample, when used in a plugin or the command bar, will rotate currently selected BaseParts.


This example prints the number of selected items whenever SelectionChanged is fired: