PcoWSkbVqDnWTu_dm2ix
Collapse Sidebar

Get

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.

Returns

Return Type Summary

An array of currently selected Instances.


Code Samples


Selection

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


Selection.SelectionChanged

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