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 » Club Houses » Clans & Guilds
Home Search
 

Re: @Unclear

Previous Thread :: Next Thread 
iamsmartcookie is not online. iamsmartcookie
Joined: 18 Aug 2012
Total Posts: 2738
08 Feb 2015 01:21 AM
http://www.roblox.com/Forum/ShowPost.aspx?PostID=155553138
Report Abuse
Unclear is not online. Unclear
Joined: 27 Aug 2011
Total Posts: 17060
08 Feb 2015 01:23 AM
Use a for loop and use concatenation.

for index = 1, N do -- N would be the largest number you have
local buttonName = "Button" .. index
-- event connection line here
end

or... you can search for button

for _, child in next, parent:GetChildren() do -- parent would be where all the buttons are
if child.Name:find("Button") then
-- event connection line here
end
end
Report Abuse
iamsmartcookie is not online. iamsmartcookie
Joined: 18 Aug 2012
Total Posts: 2738
08 Feb 2015 01:24 AM
it has different numbers at end so:

slot1, slot2 and how many players ingame.
Report Abuse
Unclear is not online. Unclear
Joined: 27 Aug 2011
Total Posts: 17060
08 Feb 2015 01:26 AM
find will match any pattern you give it, including "slot"

just iterate through all of the children of the object that contains the slot things

then check if the Name property has "slot"

if child.Name:find("slot") then

end

inside the conditional, put in an event connection hooking up to the button function
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Club Houses » Clans & Guilds
   
 
   
  • 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