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
 

Multiple Click Detectors doing samething

Previous Thread :: Next Thread 
IDKBlox is online. 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 is not online. 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 is online. 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
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