Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
3

explorer selection to plugin?

Asked by 10 years ago

how can i check what is selected in the explorer with a plugin?

1 answer

Log in to vote
3
Answered by
Tkdriverx 514 Moderation Voter
10 years ago

game.Selection:Get() Returns a table of everything that is selected. Always a table, so it needs to be able to iterate through the table:

for index, object in pairs(game.Selection:Get()) do
    print(index, object)
end
0
This also works from the command bar in Studio itself. Also, if no objects are selection, this will be an empty table. adark 5487 — 10y
0
And the in pairs won't do anything if it is given an empty table. Tkdriverx 514 — 10y
0
thanks I'll try it when I get a chance before I accept it. chabad360 34 — 10y
0
thanks chabad360 34 — 10y
Ad

Answer this question