Hello again! I’ve just been helped with creating gui mechanics with a plugin and I need one last thing. How would I check if an object in the explorer is being selected? Here is the post to my previous question.
My plugin needs to check what object is being selected from the explorer to change the source code inside of it if its a script.
You can use Selection:Get() to get a table of the current selected instances in studio. You can use Selection:Set(t) to set the selection to the instances in the table.
You can listen for Selection.SelectionChanged to detect when the selection changes.
Thanks I got it down pretty quickly. By chance do you know if I can for loop through the selections? because I’ve noticed that if I select 2 things it only prints the 2nd selection.