|
| 06 Nov 2012 04:34 PM |
| How do I check if an object is selected in studio from a plug-in point of view? Do I select everything in workspace and hook it up with a .Selected function??? |
|
|
| Report Abuse |
|
|
1Topcop
|
  |
| Joined: 09 Jun 2009 |
| Total Posts: 6635 |
|
|
| 06 Nov 2012 04:36 PM |
function isSelected(selected) for n,o in pairs(game.Selection:Get())do if(o==selected)then return n end end return end
|
|
|
| Report Abuse |
|
|
|
| 06 Nov 2012 04:36 PM |
Err, no. Use game.Selection:Get() |
|
|
| Report Abuse |
|
|
|
| 06 Nov 2012 04:39 PM |
@black Does this function get called everytime the player selects a new object?
|
|
|
| Report Abuse |
|
|
|
| 06 Nov 2012 04:42 PM |
Well, no. You will have to call it every time you need the part that is selected in the game. |
|
|
| Report Abuse |
|
|
|
| 06 Nov 2012 04:59 PM |
| Okay what function is fired when a part is selected in the game? :P |
|
|
| Report Abuse |
|
|
|
| 06 Nov 2012 05:04 PM |
maibi u cud go:
repeat wait() until game.Selection:Get() > 1
-- :3 |
|
|
| Report Abuse |
|
|
|
| 06 Nov 2012 05:04 PM |
repeat wait() until #game.Selection:Get() > 1
-- woops, mah bad.
|
|
|
| Report Abuse |
|
|
| |
|
|
| 06 Nov 2012 05:07 PM |
| have u lewked at tis yet: http://wiki.roblox.com/index.php/RBX.lua.Selection_(Service) |
|
|
| Report Abuse |
|
|