IDKBlox
|
  |
| Joined: 05 Apr 2013 |
| Total Posts: 1304 |
|
|
| 01 Dec 2017 09:34 AM |
| Using multiple click detectors to do the same thing.. How should I set it up? Should I just use a clickdetector and a serverscript within each of the items? or what is the best way to set that up? |
|
|
| Report Abuse |
|
|
Wrathoxic
|
  |
| Joined: 29 May 2013 |
| Total Posts: 1950 |
|
|
| 01 Dec 2017 09:59 AM |
ModelOfButtons = workspace.Buttons
ButtonFunction = function(Button) Button.MouseClick:Connect(function() print("Button pressed") end) end
for each,button in pairs(ModelOfButtons:GetChildren())do local cDetector = button:FindFirstChild("cDetector") if cDetector then ButtonFunction(cDetector) end end
|
|
|
| Report Abuse |
|
|
IDKBlox
|
  |
| Joined: 05 Apr 2013 |
| Total Posts: 1304 |
|
|
| 01 Dec 2017 10:37 AM |
| Oh thank you, I left something out. Say Its like a crate that is in replicated storage that i get out every like 60 seconds, what would be best way to do it with that? |
|
|
| Report Abuse |
|
|