|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|