This is the script I have right now:

script.Parent.ClickDetector.MouseClick:connect(function()
	print("Test")
end)

Script and ClickDetector are in part, part is in workspace.

I tried everything, but no matter what I do, the code still wont work. I want the script to print "Test" whenever the part is clicked.

While searching on the internet, I found out it might not work because of FilteringEnabled, but even after i unchecked it, the script still didn't work.

Does anybody know what's wrong? I literally tried everything ;-;

5 comments

0

consider changing "connect" to "Connect" as "connect" is deprecated

0

It still doesn't work.

0

Do you have the output open?

0

Yeah, but it doesn't give any errors.

0

Ohhh... I found out what was wrong. It seems I had to use normal script while I was using LocalScript. Sorry for bothering you, thank you for trying to help.