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 » Scripters
Home Search
 

Re: table help

Previous Thread :: Next Thread 
DangerousBloxxer is not online. DangerousBloxxer
Joined: 05 Mar 2011
Total Posts: 421
13 Nov 2017 12:55 PM
local buttonTable = ################################# for _, value in pairs(buttonTable) do value.Touched:connect(function() print("button touched") end) end looking to print every time someone touches one of those bricks
Report Abuse
DangerousBloxxer is not online. DangerousBloxxer
Joined: 05 Mar 2011
Total Posts: 421
13 Nov 2017 12:57 PM
button table is 8 different defined bricks

for key, value in pairs(buttonTable) do
value.Touched:connect(function()
print("button touched")
end)
end


Report Abuse
DangerousBloxxer is not online. DangerousBloxxer
Joined: 05 Mar 2011
Total Posts: 421
13 Nov 2017 01:11 PM
nvm that works, but how could check if a entire table has x property ( instead of checking one at a time )


Report Abuse
DangerousBloxxer is not online. DangerousBloxxer
Joined: 05 Mar 2011
Total Posts: 421
13 Nov 2017 01:20 PM
figured it'd be something like this but doesnt work

for _, value in pairs(buttonTable) do
value.Touched:connect(function()
wait(.5)
print("button touched")
local buttons = value:GetChildren()
if buttons .Reflectance == 0.01 then -- before.Reflectance to prevent hashtags
print("all buttons are triggered")
end
end)
end


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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