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

What is a click detector?

I found something in the objects that is a click detector.

What exactly is it and what is it's pourpose?

1 answer

✓ Accepted answer

You can place click detectors into parts and use scripts to do things when the pat is clicked by a players mouse. Let's say you have a part in workspace and you put a click detector and a script into that part. The script would look like this,

script.Parent.ClickDetector.Mouse1Click:connect(function()
    script.Parent.BrickColor = BrickColor.new(255,0,0)
end

This would change the parts brick color to red. This may have errors mainly to do with the name of property's because I'm writing this from memory but this should hopefully work. You can make the script do other things when the part is clicked too. Good luck!

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