Problems with ClickDetectors!

Hey everyone!
So I have a couple of problems with the ClickDetectors in roblox studio.

Whenever I put a ClickDetector in a part, or anything it doesn’t work.

Not just my scripts don’t work, the icon of the mouse doesn’t show up.

Any help?

1 Like

Can you show an image or video of the problem, as well as your scripts?

1 Like

Yeah sure, i will send it right now.

1 Like

There it is, its just not working.

1 Like

omg what happened to my obs!!!

1 Like

i guess its just the small vid resolution

1 Like

What is the MaxActivationDistance of the ClickDetector set at?

Is it even enabled? Your cursor’s not even turning into a pointer.

2 Likes

32 by the looks of it, don’t see that being too small though.

@NeonTaco135 it’s turned on, you can’t disable it by looking at the Properties window in the video, they might have disabled OBS mouse capture.

The resolution isn’t small btw @SDGenesis_Alt, FHD is good. Also I’d recommend changing your display name as you could get banned for impersonation.

Oh yeah, you’re right. I could have sworn I saw an Enabled property before.

1 Like

Try making the localscript a serverscript. Local scripts dont’t run on the server

I know o can get banned but I’m stuck as konekokitten xD

1 Like

I know, and that’s why there is a remote event and a local script with a server script.

If you want to fire the clickevent using a localscript put it in a service that replicates to the local player not workspace or sss

Local scripts do not work in workspace if they are not under a Player’s Characters folder.

Luckily for you, ClickDetectors are server side, so you can do .MouseClick:Connect() on your server side script and you can get the Player along with it as an automatic argument.

API references:

Script is in StarterGui for instance

local Part = workspace.Part
local ClickDetector = Part.ClickDetector

ClickDetector.MouseClick:Connect(function(plr)
	print(plr.Name.." has clicked the part on the client")
end)

Not sure why, but the cursor is still normal. The script still works though. Thanks to everyone that helped!

1 Like

Crazy how fast people can help you on devforum. Expected to have to wait days.

I know it’s unrelated but use a VPN set to Europe e.g. UK

1 Like

I know, there is no way to remove the display name even with the VPN