Star issues

When you touch something, it's supposed to give you a star. But when I tested it, when I stopped touching, the star disappeared. How do I fix this?