generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Selection in Plug-Ins?

Previous Thread :: Next Thread 
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
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 is not online. 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
blackboy167thst is not online. blackboy167thst
Joined: 22 Jul 2011
Total Posts: 2468
06 Nov 2012 04:36 PM
Err, no.
Use game.Selection:Get()
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
06 Nov 2012 04:39 PM
@black
Does this function get called everytime the player selects a new object?

Report Abuse
blackboy167thst is not online. blackboy167thst
Joined: 22 Jul 2011
Total Posts: 2468
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
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
06 Nov 2012 04:59 PM
Okay what function is fired when a part is selected in the game? :P
Report Abuse
littleAU999 is not online. littleAU999
Joined: 15 Jan 2011
Total Posts: 1375
06 Nov 2012 05:04 PM
maibi u cud go:

repeat wait() until game.Selection:Get() > 1

-- :3
Report Abuse
littleAU999 is not online. littleAU999
Joined: 15 Jan 2011
Total Posts: 1375
06 Nov 2012 05:04 PM
repeat wait() until #game.Selection:Get() > 1

-- woops, mah bad.
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
06 Nov 2012 05:04 PM
I am not using loops. >;3
Report Abuse
littleAU999 is not online. littleAU999
Joined: 15 Jan 2011
Total Posts: 1375
06 Nov 2012 05:07 PM
have u lewked at tis yet: http://wiki.roblox.com/index.php/RBX.lua.Selection_(Service)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image