I am trying to delete an object when a user clicks on such object, but I am recieving no information that a click has been registered by the user (Via the prints) and the model is not deleted. According to the documentation this should be possible. I have had other users test this out also but they also had no luck. Is this a bug or can it not be done?
Model in question:
script:
script.Parent.ClickDetector.MouseClick:Connect(function()
print("Attempting to delete...")
script.Parent:Destroy()
print("Failed to delete!")
end)
According to ClickDetector | Documentation - Roblox Creator Hub (“They work when parented to BasePart , Model or Folder objects.”) it should function. Hovering over the object does register that it is clickable but it refuses to register any clicks.
Have you checked the output for any errors? I set up a model with a ClickDetector and your script, and it worked fine for me. Does the script have anything else in it?