Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

ClickDetector not Printing when clicked?

Asked by 5 years ago
Edited 5 years ago

Code in the local script (Just tells it to print when clicked on the model)

1script.Parent.ClickDetector.MouseClick:Connect(function()
2print("this is working")
3end)

It's not printing into the output when clicking on the model

Setup:

Note: Model is in ServerStorage for Cloning

Model is parent of (LocalScript and ClickDetector)

Link To Setup: https://ibb.co/6Zyf5Wn

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

You can't use local scripts in click detectors.

Use a script for click detectors.

1script.Parent.ClickDetector.MouseClick:Connect(function(plr)
2    print(plr.Name.. "clicked and this is working!")
3end)
Ad

Answer this question