On this page it uses code that acts on a “click” action but if you’re trying to learn Defold and use a blank project or a mobile project template the input bindings are set to “Touch” for mouse button1. Only a desktop template (perhaps others) have input binding for mouse = clicked. So the code fails and you’re left trying to figure out the issue.
The page should make note of the need for input bindings to match the msg used to read the input.