ClickDetector not Functioning

This is a short post, but I hope I can get an answer.

I think the problem is that the ClickDetectors are inside the character’s body parts. Is there a way to “fix” this, is it intentional, or is it just a bug? I’ve tested in empty places with just a Baseplate and character (with a ClickDetector in a body part). Still, it didn’t work, even after isolating it from everything else. Any ideas?

image

The code seems to be working as intended. You are creating and parenting a new ClickDetector to every single part of the player’s Character. Also, you have your MouseClick:connect function inside the for loop.

Could you describe your goal here? What do you want to achieve?

1 Like

The code is working as intended, but the problem is that the actual ClickDetectors aren’t. I think that it’s because it’s inside a character, but I’m not too sure.

I’ve edited my post, it’s because your MouseClick:connect function is inside the for loop that’s handling the creation and parenting of ClickDetectors.

Nevermind, I just realise that that is intended, my bad.

Is this your own character or another’s? Your own character is blacklisted from PlayerMouse and by extent ClickDetectors. You will need to manually raycast in that case to find the mouse target without ignoring the character.

4 Likes

That must be it. Thanks!

I believe click detectors work as expected when parented to models - you can click any part of the model.

But I’m not sure if the player can detect a click detect in it’s own player’s model - I think I tried something like that years ago but it didn’t work - but I could be wrong on this.

1 Like