Scotty is afraid of thunder and his friends want to help him, so they work out that you can tell how close or far away a storm is by counting the time between lightning and thunder