Click Detector (On Client) Does Not Fire When Parented To A Player's Character

I have a local script that creates a click detector in each player’s character, from each player’s client, so that each client has a copy of the click detector. This is used so that you can click on someone’s character and it will pop up a menu about them. For some reason, the click detector is not functional (won’t show itself when I hover over my avatar), but when I parent it to a nearby table, I can click the table.

How do I get around this? Is it not possible to put a click detector in a character?

Edit: I suppose the question as it was asked was not entirely solved, but my system is functional, and it does what I want, so all is good!

Try making the parent of the click detector to the players humanoid?

Alright, I tried it, and it does not work. Any other suggestions?

Parent it to their humanoid root part?

1 Like

Hmm, it seems that doesn’t work either.

And you’re changing the parent via script?

Make sure the click detector is actually inside the character. Like open the explorer while play testing. It might be an error in your script.

I’m moving it around in the explorer menu in studio

Yeah, I checked to make sure, and it is. Hmm.

You’re testing it with an NPC?

I’m testing it on myself, but I tried putting it in an NPC and it worked. So it’s only my character that doesn’t work.

Can you not click on it, as in the click detector mouse symbol doesn’t appear, or when you click it nothing happens? Which one?

The mouse symbol thing doesn’t even appear

A hacky solution would to have a part with a ClickDetector that is continuously CFramed to the player it belongs to.

1 Like

I will keep that in mind, if I can’t find some other solution.

1 Like

I am really lost at this point. @A_thruZAlt has a good idea and that might be the way to go.

Ok, here’s something: If I create the click detector on the Server, it works fine.

Right, but does Roblox allow you to click on yourself with a clickdetector in general?
Try testing the game with 2 clients, parent it to Player2 then see.

2 Likes

It works perfectly on other players. Funny thing is, I only wanted it to work on other players anyways. Thanks for the help! :smiley:

1 Like