UserStory:
As a developer, it is currently annoying and time-consuming to access Studio’s current selection in the command bar. For instance, if I select two parts and want to join them together, I’d use something like this:
local s1 = game.Selection:Get()[1]; local s2 = game.Selection:Get()[2]; local w = Instance.new("Weld"); w.Part0 = s1; s.Part1 = s2; w.Parent = s1
About half of that code snippet is dedicated to defining the current selection so I can access it.
A Solution:
Google Chrome faced this same challenge with their Inspector+Console. They opted to define $0 in the console to always point to the selected element in the Inspector:
The above code would become:
local w = Instance.new("Weld"); w.Part0 = $1; w.Part1 = $2; w.Parent = $1
which is substantially easier and more convenient to use than the alternative. The exact syntax doesn’t need to be the same (i.e. ROBLOX could use something like _1, _2, etc instead), but a shorthand for the current selection in Studio within the command bar would be tremendously valuable. Shorthand for every selected item would also be useful.
Use Cases:
- Join the selection together
- Parent the first select model to another select location (can’t copy+paste because that moves parts)
- Iterate through selection to change all green parts to red
- Any other sort of quick manipulation of the selection