Make sure you connect your script to the right wire (labeled "On Play"), not the bottom (labeled "After").

This is because the bottom wire on every script block is always connected to the top input, which runs every frame (unless something is plugged into it). It may seem weird, but it's more consistent than the alternative, and it can even be useful at times.