Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

ClickDetector not Printing when clicked?

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

✓ Accepted answer

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)

This discussion is preserved as it was. New answers, comments, and votes are closed.