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)

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

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.

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

Answer this question