How do I make a script click clickdetectors?

I want to make a script that can click a click detector. Is that possible?

1 Like

https://developer.roblox.com/en-us/api-reference/event/ClickDetector/MouseClick

1 Like

That sounds kinda fishy…
Yes it is possible i see exploiters use it for tycoons

2 Likes

Im using it for my light switch system in my game. I want to be able to turn lights off but the function cant be outside off the click detect event so Im stuck

1 Like

I dont see anything about it on this post is it not possible?

[Edit: This information may not be useful. I thought you wanted a separate script to fire a clickdetector without clicking on it. To fire an event by clicking on a Clickdetector, put the script inside of the Clickdetector or its parent. You’ll still need to use the MouseClick event to fire a function.]

You cant make the script fire the Click detector AFAIK. But you could make the click detector fire a separate function that is not tied directly to the click detector. The script would fire that instead of the click detector.

1 Like

Look under “Creating a ClickDetector Door”

The problem with that is I want to be able to not make it do anything on click again until the function I would be calling is finished.


here is what I mean. Look at the non highlighted part

Try putting the debounce (coolDown) checker earlier in the function.

1 Like

Does it print any errors? This should work when the player presses the button

Ok I will do that Ill post my solution once I finish.

solution I got: