ClickDetectors fire twice, but only on one specific place/file

This drives me insane. I made a very similar post a few months ago: link, but just as a scripting issue. Both of these reports happen in this place, so I’m starting to think there’s something CURSED about it. On game page it says created in september 2025, but I actually it’s a reupload of a place created in 2022, so maybe some roblox files inside that I can’t see are outdated/corrupted?
So the actual bug report:
In the main place, when I create a “wire node” it is initialized (click detectors and connections set up). When I then click it, the MouseClick event fires twice.
(Clicking two wires is supposed to connect them, that’s the point of clickdetectors there.) I couldn’t figure out what caused it to fire twice, because when I simply create a clickdetector on a normal part it fires normally, just once. I started testing literally everything and I figured out that if I move everything to a different place, it fires only once. Moreover, when add a breakpoint on print("Fired"), it pauses only the first time, then no matter how I continue (unpause, or even step one by one line), it doesn’t pause the script for the 2nd time, it only prints “fired”.

In short: on one (2022) place, the exact same script works differently than when pasted onto a freshly created file. On both places, it connects ClickDetector event just once (as “connecting wire node” is printed only once per node). But on the first place, the event seems to be fired twice (“Fired” is printed twice per click). However, breakpoints don’t pause the script on the 2nd “Fired”.

Video explanation:


On the first place, clicking a black block prints “Fired” once as it should, but on the second place it prints “Fired” two times when clicked/

Those are the files, the first one has this bug, while second “differentfile” works as expected:
APalldeleted.rbxl (61.9 KB)
apdifferentfile_alldeleted.rbxl (57.1 KB)

System information:
AMD Ryzen 5 9600X 6-Core
32GB
NVIDIA GeForce RTX 5060 Ti
AMD Radeon™ Graphics

This bug is quite similar to the post I mentioned in the first line. That too happened only on this cursed place and worked correctly elsewhere, as if some core scripts are broken in this game. That bug also had some weird issues with debugging (like skipping breakpoints), iirc.

Expected behavior

I expect the TouchDetector to fire once when clicked.
Or, I wish it at least worked the same way regardless of a file it’s on, because THAT makes me feel insane

I seem to also be running into this issue with my own projects

Using the places Gratka provided If you create a part and tag with wirenode it won’t happen but if you then duplicate that part and click on the duplicated part it will double fire

also only seems to happen on Immediate signal behavior doing the same thing on deferred doesn’t double fire

Something interesting I’ve noticed is if you use childAdded it doesn’t happen but if you use DescendantAdded it does and if you add a task.wait() before parenting the clickdetector it fixes it

1 Like

Update: (when I thought it couldn’t get any more confusing)
When I add task.wait(), the problem is fixed.
The wait can be added anywhere between line 138 and 143. However when it’s on line 144, the “fired” is still printed twice.

try in published outside studio

@Gratka0414 I’ve been digging into this issue too. It seems like a classic case of async event handling gone wrong. Have you tried using a script that doesn’t use Immediate signal behavior? And what about removing the task.wait() and just checking if DescendantAdded is fired instead of ChildAdded?

1 Like

I forgot to say that you both are right, the difference between those two files is that workspace.SignalBehavior was set to Default (Immediate) on the old one and Deferred on the new one. Thank you I wouldn’t catch it lol
Being honest it doesn’t bother me enough to do even more testing with DescendantAdded etc :face_with_tongue:

But the bug is still here, ClickDetectors behave weirdly when connected using certain events with SignalBehavior set to Immediate

This is the best summary of this whole bug

Thanks for reporting the issue! We’ve looked into this and this was caused by setting event connection and parenting at the same time, which should be fixed by setting workspace.SignalBehavior to Deferred. Immediate behavior will be deprecated later and shouldn’t be used since it’ll cause lots of issue. See Deferred Lua Event Handling for more details. Hope it helps!