Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How would i be able to manage/use multiple click detectors in different parts with one script?

Ok so i have multiple parts in one model. Each one has a click detector and a script. I want to be able to use click detectors with one script as a child of the model. -Workspace -model -script -part -click detector -part -click detector -part -click detector -part -click detector

I tried using a for loop but you have to wait to click one specific part before you can click the second specific part...

2 comments

0

Ignore the -Workspace -model -script -part -click detector -part -click detector -part -click detector -part -click detector

0

This was one year ago and you probably figured this out but to heck with it. Use a for loop to get all click detectors and connect them to function within. Less code, can't say it's more efficient but...

1 answer

You can just put as many functions as you want in one script.

PART.ClickDetector.MouseClick:connect(function()
stuff
end)
PART.ClickDetector.MouseClick:connect(function()
stuff
end)
PART.ClickDetector.MouseClick:connect(function()
stuff
end)

and so on

This discussion is preserved as it was. New answers, comments, and votes are closed.