Use the number keys to place towers. Don't place towers in red. The blue circle is the range of a tower.
So I used a basic placement system at the start, and it worked fine until I tried to add a feature (I forgot what it was, but I removed it.) After I removed the feature I set everything back to what it was before, but the game broke. And costumes changed for no reason. So I gave up. A couple of days later, I thought about the project. I had figured out a more advanced code, that did the same thing as the basic code. So I tried it. And it worked. I added new features, and towers, and changed after that. And the game works!